package com.adealink.weparty.wallet.detail.tab

import androidx.fragment.app.Fragment
import com.adealink.frame.aab.util.getCompatString
import com.adealink.weparty.module.wallet.data.Currency
import com.adealink.weparty.wallet.detail.bean.BeanFragment
import com.adealink.weparty.wallet.detail.coin.CoinFragment
import com.adealink.weparty.wallet.detail.diamond.DiamondFragment
import com.adealink.weparty.R as APP_R

data class Tab(
    val type: Currency,
    val name: (() -> String),
    val fragmentBuilder: () -> Fragment
)

val COIN_TAB = Tab(
    type = Currency.COIN,
    name = {
        getCompatString(APP_R.string.common_coin)
    },
    fragmentBuilder = {
        CoinFragment()
    }
)

val DIAMOND_TAB = Tab(
    type = Currency.DIAMOND,
    name = {
        getCompatString(APP_R.string.common_diamond)
    },
    fragmentBuilder = {
        DiamondFragment()
    }
)

val BEAN_TAB = Tab(
    type = Currency.BEAN,
    name = {
        getCompatString(APP_R.string.common_bean)
    },
    fragmentBuilder = {
        BeanFragment()
    }
)


val DETAIL_TABS = listOf(
    COIN_TAB, DIAMOND_TAB, BEAN_TAB
)