package com.gh.gamecenter.common.view

import android.content.Context
import android.util.AttributeSet
import com.google.android.material.appbar.CollapsingToolbarLayout

class ScrimAwareCollapsingToolbarLayout @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
    CollapsingToolbarLayout(context, attrs) {

    var scrimShownAction: ((shown: Boolean) -> Unit)? = null

    override fun setScrimsShown(shown: Boolean) {
        scrimShownAction?.invoke(shown)

        super.setScrimsShown(shown)
    }
}