package com.atmob.keyboard_android.util

import android.view.View
import com.atmob.keyboard_android.component.ComponentMediator
import com.atmob.keyboard_android.component.child.IKeyboardGuideComponent
import com.atmob.keyboard_android.component.root.IKeyboardRootComponent
import com.atmob.keyboard_android.model.AiKeyboardKeyModel

/**
 * 键盘引导弹窗工具类
 */
class KeyboardGuideDialogUtil {
    companion object {
        /**
         * 显示键盘引导弹窗
         */
        fun showGuideDialog(
            targetView: View,
            dataModel: AiKeyboardKeyModel,
            actionCallback: IKeyboardGuideComponent.OnActionCallback
        ) {
            val keyboardRootComponent =
                ComponentMediator.findComponent<IKeyboardRootComponent>(
                    IKeyboardRootComponent::class.java
                )
            keyboardRootComponent?.showKeyboardGuideDialog(targetView, dataModel, actionCallback)
        }
    }
}