package com.ama.core.architecture.startup

import android.app.Application
import android.content.Context
import androidx.startup.Initializer
import com.ama.core.architecture.message.MessageManager
import com.ama.core.architecture.message.collector.ToastMessageCollector
import com.ama.core.architecture.message.controller.DefaultMessageController


class BaseGlobalMessageInitializer : Initializer<Unit> {

    override fun create(context: Context) {
        // 初始化全局消息
        MessageManager.initGlobalMessage(
            context as Application,
            DefaultMessageController(),
            ToastMessageCollector(context)
        )
//        MessageManager.initGlobalMessage(
//            context as Application,
//            DefaultMessageController(),
//            SnakbarViewMessageCollector(null)
//        )
    }

    override fun dependencies(): MutableList<Class<out Initializer<*>>> {
        return mutableListOf()
    }
}