/*
 * COPYRIGHT (c) 2018 All rights reserved by HANWHA LIFE.
 */
package kr.co.zumo.app.lifeplus.activity.factory;

import kr.co.zumo.app.lifeplus.activity.ActivityBase;
import kr.co.zumo.app.lifeplus.activity.NetworkErrorActivity;
import kr.co.zumo.app.lifeplus.activity.MainActivity;
import kr.co.zumo.app.lifeplus.activity.SignUpActivity;
import kr.co.zumo.app.lifeplus.activity.TutorialActivity;
import kr.co.zumo.app.lifeplus.supervisor.ScreenID;

/**
 * ActivityFactory
 * <pre>
 * Activity Id 로 구분된 Activity.class 를 반환한다.
 * </pre>
 *
 * @author 민효동
 * @version 1.0
 * @history 민효동   [2018. 9. 5.]   [최초 작성]
 * @since 2018. 9. 5.
 */
public class ActivityFactory {

  /**
   * Activity Id 로 구분된 Activity.class 를 반환한다.
   *
   * @param id ScreenID.ACTIVITY_MAIN
   * @return MainActivity.class
   */
  public Class<? extends ActivityBase> getActivityClass(int id) {
    Class<? extends ActivityBase> activity;
    switch (id) {
      case ScreenID.ACTIVITY_MAIN:
        activity = MainActivity.class;
        break;
      case ScreenID.ACTIVITY_SIGN_UP:
        activity = SignUpActivity.class;
        break;
      case ScreenID.ACTIVITY_TUTORIAL:
        activity = TutorialActivity.class;
        break;
      case ScreenID.ACTIVITY_NETWORK_ERROR:
        activity = NetworkErrorActivity.class;
        break;
      case ScreenID.ACTIVITY_AUTHORIZATION:
        // fixme authorization activity
        activity = SignUpActivity.class;
        break;
      default:
        activity = null;
        break;
    }
    return activity;
  }
}
