package com.adealink.weparty.effect

import android.content.Intent
import android.view.View
import androidx.fragment.app.FragmentManager
import com.adealink.frame.effect.data.AnimExtraConfig
import com.adealink.frame.effect.data.EffectAnimType
import com.adealink.frame.effect.data.IAnimDynamicProvider
import com.adealink.frame.effect.view.IWeAnimPlayListener

interface IPreviewView {
    fun setURL(
        previewUrl: String,
        animType: EffectAnimType? = null,
        intent: Intent? = null,
        fragmentManager: FragmentManager? = null,
        animExtraConfig: AnimExtraConfig = AnimExtraConfig(),
        dynamicProvider: IAnimDynamicProvider? = null,
        playListener: IWeAnimPlayListener? = null
    )
    fun setMedal(
        previewUrl: String,
        animType: EffectAnimType? = null,
        intent: Intent? = null,
        fragmentManager: FragmentManager? = null,
        autoPlay: Boolean = true,
        level: Int = 0,
        subLevel: Int = 0,
        playListener: IWeAnimPlayListener? = null
    )

    fun setMedalViewConfig(medalViewConfig: IPreviewView.IMedalViewConfig)

    fun startPlay()

    fun stopPlay()

    interface IMedalViewConfig {
        fun isViewEnable(view: View): Boolean

        fun attachRecoverPlay(): Boolean

        fun onPlayEnd()
    }
}