package cl.homelogic.platform.designsystem.extensions

import androidx.compose.ui.text.font.FontWeight

enum class FontWeightTypes(
    val weight: Int,
) {
    Thin(100),
    ExtraLight(200),
    Light(300),
    Normal(400),
    Medium(500),
    SemiBold(600),
    Bold(700),
    ExtraBold(800),
    Black(900),
}

fun FontWeight.toType(): FontWeightTypes =
    when (this.weight) {
        FontWeightTypes.Thin.weight -> FontWeightTypes.Thin
        FontWeightTypes.ExtraLight.weight -> FontWeightTypes.ExtraLight
        FontWeightTypes.Light.weight -> FontWeightTypes.Light
        FontWeightTypes.Normal.weight -> FontWeightTypes.Normal
        FontWeightTypes.Medium.weight -> FontWeightTypes.Medium
        FontWeightTypes.SemiBold.weight -> FontWeightTypes.SemiBold
        FontWeightTypes.Bold.weight -> FontWeightTypes.Bold
        FontWeightTypes.ExtraBold.weight -> FontWeightTypes.ExtraBold
        FontWeightTypes.Black.weight -> FontWeightTypes.Black
        else -> FontWeightTypes.Normal
    }
