package com.gh.gamecenter.energy.provider

import android.app.Dialog
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.gh.gamecenter.common.constant.RouteConsts
import com.gh.gamecenter.core.provider.IDialogUtilsProvider
import com.gh.gamecenter.core.utils.ToastUtils

@Route(path = RouteConsts.provider.dialogUtils, name = "DialogUtils暴露服务")
class DialogUtilsProviderImpl : IDialogUtilsProvider {
    override fun showRegulationTestDialog(context: Context, confirm: () -> Unit, cancel: () -> Unit) {
        ToastUtils.toast("调用->DialogUtilsProviderImpl.showRegulationTestDialog")
    }

    override fun showWaitDialog(context: Context, string: String): Dialog {
        ToastUtils.toast("调用->DialogUtilsProviderImpl.showWaitDialog")
        return Dialog(context)
    }

    override fun showForceDialog(
        context: Context,
        title: String,
        message: CharSequence,
        positive: String,
        negative: String,
        confirm: () -> Unit,
        cancel: () -> Unit
    ) {
        ToastUtils.toast("调用->DialogUtilsProviderImpl.showForceDialog")
    }

    override fun showUsageStatsDialog(context: Context, confirm: () -> Unit, cancel: () -> Unit) {
        ToastUtils.toast("调用->DialogUtilsProviderImpl.showUsageStatsDialog")
    }

    override fun showNoticeDialog(
        context: Context,
        title: String,
        content: String,
        confirm: () -> Unit
    ) {
        ToastUtils.toast("调用->DialogUtilsProviderImpl.showNoticeDialog")
    }

    override fun showBindPhoneDialog(context: Context, confirm: () -> Unit): Dialog {
        ToastUtils.toast("调用->DialogUtilsProviderImpl.showBindPhoneDialog")
        return Dialog(context)
    }

    override fun init(context: Context?) {
        // Do nothing
    }
}