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

import kr.co.zumo.app.R;
import kr.co.zumo.app.lifeplus.model.SignUpModel;
import kr.co.zumo.app.lifeplus.util.ResourceUtil;
import kr.co.zumo.app.lifeplus.view.Event;

/**
 * SignUpCompletePresenter
 * <pre>
 * </pre>
 *
 * @author 민효동
 * @version 1.0
 * @history 민효동   [2018. 9. 28.]   [최초 작성]
 * @since 2018. 9. 28.
 */
public class SignUpCompleteZumoPresenter extends SignUpCompletePresenter {

  public SignUpCompleteZumoPresenter(SignUpModel model, ISignUpCompletedView view) {
    super(model, view);
  }

  @Override
  protected void onEventInternal(Event event) {
    switch (event.getEventId()) {
      case Event.INIT:
        model.getPreferences().setZumoUserUpdateCompleted(true);
        String text = String.format(ResourceUtil.getString(R.string.sign_up_success_message_from_zumo), model.getMobileAuthorizationBean().getName());
        view.setText(text);
        break;
      default:
        super.onEventInternal(event);
        break;
    }
  }
}
