package com.adealink.weparty.share.qrcode

import com.adealink.frame.aab.util.getCompatString
import com.adealink.weparty.commonui.BaseFragment
import com.adealink.weparty.share.R
import com.adealink.weparty.share.qrcode.page.CommonQRCodeFragment
import com.adealink.weparty.share.qrcode.page.SpecialQRCodeFragment

enum class QRCodeTab {
    COMMON,
    SPECIAl;
}

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

val COMMON_TAB = Tab(
    type = QRCodeTab.COMMON,
    name = {
        getCompatString(R.string.share_common_qr_code)
    },
    fragmentBuilder = {
        CommonQRCodeFragment()
    }
)

val SPECIAL_TAB = Tab(
    type = QRCodeTab.SPECIAl,
    name = {
        getCompatString(R.string.share_common_special_code)
    },
    fragmentBuilder = {
        SpecialQRCodeFragment()
    }
)


val QR_CODE_TABS = listOf(
    COMMON_TAB, SPECIAL_TAB
)