package com.pixelized.desktop.lwa.ui.screen.admin.common

import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Stable
import com.pixelized.desktop.lwa.ui.theme.lwa
import lwacharactersheet.composeapp.generated.resources.Res
import lwacharactersheet.composeapp.generated.resources.ic_account_child_invert_24dp
import lwacharactersheet.composeapp.generated.resources.ic_blur_on_24dp
import lwacharactersheet.composeapp.generated.resources.ic_iron_24dp
import lwacharactersheet.composeapp.generated.resources.ic_map_24dp
import lwacharactersheet.composeapp.generated.resources.ic_special_character_24dp
import org.jetbrains.compose.resources.DrawableResource
import org.jetbrains.compose.resources.painterResource

@Stable
enum class GMTabUio(
    val icon: DrawableResource,
) {
    Actions(icon = Res.drawable.ic_special_character_24dp),
    Characters(icon = Res.drawable.ic_account_child_invert_24dp),
    Alterations(icon = Res.drawable.ic_blur_on_24dp),
    Objects(icon = Res.drawable.ic_iron_24dp),
    Map(icon = Res.drawable.ic_map_24dp),
}

@Composable
fun GMTab(
    tab: GMTabUio,
    onClick: () -> Unit,
) {
    IconButton(
        onClick = onClick
    ) {
        Icon(
            painter = painterResource(tab.icon),
            tint = MaterialTheme.lwa.colorScheme.base.primary,
            contentDescription = null,
        )
    }
}