package kr.co.vividnext.sodalive.explorer.profile

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import kr.co.vividnext.sodalive.R

class CreatorFollowNotifyFragment(
    private val onClickNotifyAll: () -> Unit,
    private val onClickNotifyNone: () -> Unit,
    private val onClickUnFollow: () -> Unit,
) : BottomSheetDialogFragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View = inflater.inflate(
        R.layout.fragment_creator_follow_notify,
        container,
        false
    )

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        view.findViewById<LinearLayout>(R.id.ll_notify_all).setOnClickListener {
            onClickNotifyAll()
            dialog?.dismiss()
        }

        view.findViewById<LinearLayout>(R.id.ll_notify_none).setOnClickListener {
            onClickNotifyNone()
            dialog?.dismiss()
        }

        view.findViewById<LinearLayout>(R.id.ll_unfollow).setOnClickListener {
            onClickUnFollow()
            dialog?.dismiss()
        }
    }
}
