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

import kr.co.zumo.app.lifeplus.view.dialog.AddRegistrationDialog;
import kr.co.zumo.app.lifeplus.view.dialog.AlertDialog;
import kr.co.zumo.app.lifeplus.view.dialog.DialogBase;
import kr.co.zumo.app.lifeplus.view.dialog.DialogID;
import kr.co.zumo.app.lifeplus.view.dialog.WebDialog;

/**
 * BasicDialogFactory
 * <pre>
 * </pre>
 *
 * @author 민효동
 * @version 1.0
 * @history 민효동   [2018-09-23]   [최초 작성]
 * @since 2018-09-23
 */
public class BasicDialogFactory implements IDialogFactory {

  @Override
  public DialogBase getDialogById(@DialogID.ID int id) {
    DialogBase dialog;
    switch (id) {
      case DialogID.WEB:
        dialog = new WebDialog();
        break;
      case DialogID.ADD_REGISTRATION:
        dialog = new AddRegistrationDialog();
        break;
      case DialogID.ALERT:
        dialog = new AlertDialog();
        break;
      default:
        throw new Error("Unsupported dialog.");
    }

    return dialog;
  }
}
