package com.remax.visualnovel.ui.main

import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.LinearLayout
import com.remax.visualnovel.R
import com.remax.visualnovel.databinding.ToolbarMainBinding
import com.remax.visualnovel.entity.response.ChatSound

class MainToolbar @JvmOverloads constructor(
    context: Context,
    attrs: AttributeSet? = null,
    defStyleAttr: Int = 0
) : LinearLayout(context, attrs, defStyleAttr) {
    private lateinit var items: List<ChatSound>
    private var mBinding: ToolbarMainBinding

    private lateinit var mEventListener: IEventListener


    interface IEventListener {
        fun onSoundSelected(sound: ChatSound)
    }


    init {
        mBinding = ToolbarMainBinding.inflate(LayoutInflater.from(context), this, true)
        with(mBinding) {
            avatarView.loadImageResourceAvatar(R.mipmap.sex_man_big)
            tvDiamondLevel.text = "150"
        }
    }


    fun setEventListener(eventListener: IEventListener) {
        mEventListener = eventListener
    }


}