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

import android.os.Bundle;

import kr.co.zumo.app.R;
import kr.co.zumo.app.lifeplus.manager.ActionBarManager;
import kr.co.zumo.app.lifeplus.model.SignUpModel;
import kr.co.zumo.app.lifeplus.supervisor.ScreenChangerHelper;
import kr.co.zumo.app.lifeplus.view.Event;
import kr.co.zumo.app.lifeplus.view.ISignUpView;
import kr.co.zumo.app.lifeplus.view.fragment.factory.BasicFragmentFactory;
import kr.co.zumo.app.lifeplus.view.fragment.factory.FragmentFactory;
import kr.co.zumo.app.lifeplus.view.presenter.SignUpPresenter;

/**
 * SignUpActivity
 * <pre>
 * </pre>
 *
 * @author 민효동
 * @version 1.0
 * @history 민효동   [2018. 9. 5.]   [최초 작성]
 * @since 2018. 9. 5.
 */
public class SignUpActivity extends ActivityBase<SignUpPresenter> implements ISignUpView {

  @Override
  void onAfterCreate(Bundle savedInstanceState) {

    setContentView(R.layout.activity_sign_up);

    ScreenChangerHelper.getInstance().setAppCompatActivity(this);
    ScreenChangerHelper.getInstance().setContainerId(R.id.sign_up_container);

    model.setFragmentFactory(defineFragmentFactory());

    presenter.onEvent(new Event.Builder(Event.SIGN_UP).build());

  }

  protected FragmentFactory defineFragmentFactory() {
    return new BasicFragmentFactory();
  }

  @Override
  protected void onDestroy() {
    super.onDestroy();
  }

  @Override
  void defineActionBar() {
    ActionBarManager actionBarManager = ActionBarManager.getInstance();
    actionBarManager.setProgressVisible(true);
    actionBarManager.setTitleVisible(false);
    actionBarManager.setBiVisible(false);
    actionBarManager.setMenuVisible(false);
    actionBarManager.setSearchVisible(false);
    actionBarManager.setBackVisible(true);
    actionBarManager.show();
  }

  @Override
  SignUpPresenter definePresenter() {
    return new SignUpPresenter(getModel(SignUpModel.class), this);
  }

}

