package com.gh.gamecenter

import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.gh.gamecenter.common.base.activity.ToolBarActivity
import com.gh.gamecenter.common.constant.EntranceConsts
import com.gh.gamecenter.login.user.UserViewModel
import com.halo.assistant.fragment.user.UserInfoEditFragment

class UserInfoEditActivity : ToolBarActivity() {
    companion object {
        fun getIntent(context: Context, editType: String): Intent {
            return getIntent(context, editType, false)
        }

        /**
         * 获取修改信息 intent
         * @param editType 类型
         * @param isForcedToCertificate 来源是否为强制实名
         */
        fun getIntent(
            context: Context,
            editType: String,
            isForcedToCertificate: Boolean
        ): Intent {
            val args = Bundle()
            args.putString(UserViewModel.KEY_EDIT_TYPE, editType)
            args.putBoolean(EntranceConsts.KEY_IS_FORCED_TO_CERTIFICATE, isForcedToCertificate)
            return getTargetIntent(
                context,
                UserInfoEditActivity::class.java,
                UserInfoEditFragment::class.java, args
            )
        }
    }
}