package com.adealink.weparty.room.applymic

import com.adealink.frame.aab.util.getCompatString
import com.adealink.weparty.commonui.BaseFragment
import com.adealink.weparty.room.R
import com.adealink.weparty.room.applymic.data.APPLY_MIC_LIST_TYPE_GUEST
import com.adealink.weparty.room.applymic.data.APPLY_MIC_LIST_TYPE_PLAYMATE

enum class HostApplyMicTab {
    GUEST,
    PLAYMATE;
}

data class Tab(
    val type: HostApplyMicTab,
    val name: (() -> String),
    val fragmentBuilder: () -> BaseFragment
)

val GUEST_TAB = Tab(
    type = HostApplyMicTab.GUEST,
    name = {
        getCompatString(R.string.room_host_apply_mic_guest_tab)
    },
    fragmentBuilder = {
        HostApplyListFragment().apply {
            setSearchType(APPLY_MIC_LIST_TYPE_GUEST, false)
        }
    }
)

val PLAYMATE_TAB = Tab(
    type = HostApplyMicTab.PLAYMATE,
    name = {
        getCompatString(R.string.room_host_apply_mic_playmate_tab)
    },
    fragmentBuilder = {
        HostApplyListFragment().apply {
            setSearchType(APPLY_MIC_LIST_TYPE_PLAYMATE, true)
        }
    }
)


val HOST_APPLY_MIC_TABS = listOf(
    GUEST_TAB, PLAYMATE_TAB
)