package id.iiyh.inatrading.core.ui.components

import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.height
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import id.iiyh.inatrading.R

/**
 * INA Trading logo — renders the official PNG asset.
 *
 * @param size Skala logo — [LogoSize.Small] untuk appbar, [LogoSize.Large] untuk splash.
 */
@Composable
fun InaLogo(
    modifier: Modifier = Modifier,
    size: LogoSize = LogoSize.Medium,
) {
    Image(
        painter            = painterResource(R.drawable.header_new),
        contentDescription = "INA Trading",
        contentScale       = ContentScale.Fit,
        modifier           = modifier.then(size.modifier),
    )
}

// ─── Size variants ────────────────────────────────────────────────────────────

enum class LogoSize(val modifier: Modifier) {
    /** Top App Bar */
    Small(modifier  = Modifier.height(36.dp)),

    /** Default — onboarding header */
    Medium(modifier = Modifier.height(56.dp)),

    /** Splash screen */
    Large(modifier  = Modifier.height(80.dp)),
}
