package cl.homelogic.platform.designsystem.foundations.fonts.materialsymbols

import androidx.compose.runtime.Composable
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import cl.homelogic.platform.common.Platform
import cl.homelogic.platform.common.PlatformTypes
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsOutlined_Bold
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsOutlined_ExtraLight
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsOutlined_Filled_Bold
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsOutlined_Filled_ExtraLight
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsOutlined_Filled_Light
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsOutlined_Filled_Medium
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsOutlined_Filled_Regular
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsOutlined_Filled_SemiBold
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsOutlined_Light
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsOutlined_Medium
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsOutlined_Regular
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsOutlined_SemiBold
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsRounded_Bold
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsRounded_ExtraLight
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsRounded_Filled_Bold
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsRounded_Filled_ExtraLight
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsRounded_Filled_Light
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsRounded_Filled_Medium
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsRounded_Filled_Regular
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsRounded_Filled_SemiBold
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsRounded_Light
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsRounded_Medium
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsRounded_Regular
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsRounded_SemiBold
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsSharp_Bold
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsSharp_ExtraLight
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsSharp_Filled_Bold
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsSharp_Filled_ExtraLight
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsSharp_Filled_Light
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsSharp_Filled_Medium
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsSharp_Filled_Regular
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsSharp_Filled_SemiBold
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsSharp_Light
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsSharp_Medium
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsSharp_Regular
import cl.homelogic.platform.designsystem.resources.MaterialSymbolsSharp_SemiBold
import cl.homelogic.platform.designsystem.resources.Res
import org.jetbrains.compose.resources.Font

@Composable
internal fun SymbolsSharpFontFamily() =
    FontFamily(
        Font(Res.font.MaterialSymbolsSharp_ExtraLight, weight = FontWeight.ExtraLight),
        Font(Res.font.MaterialSymbolsSharp_Light, weight = FontWeight.Light),
        Font(Res.font.MaterialSymbolsSharp_Regular, weight = FontWeight.Normal),
        Font(Res.font.MaterialSymbolsSharp_Medium, weight = FontWeight.Medium),
        Font(Res.font.MaterialSymbolsSharp_SemiBold, weight = FontWeight.SemiBold),
        Font(Res.font.MaterialSymbolsSharp_Bold, weight = FontWeight.Bold),
    )

@Composable
internal fun SymbolsSharpFilledFontFamily() =
    FontFamily(
        Font(Res.font.MaterialSymbolsSharp_Filled_ExtraLight, weight = FontWeight.ExtraLight),
        Font(Res.font.MaterialSymbolsSharp_Filled_Light, weight = FontWeight.Light),
        Font(Res.font.MaterialSymbolsSharp_Filled_Regular, weight = FontWeight.Normal),
        Font(Res.font.MaterialSymbolsSharp_Filled_Medium, weight = FontWeight.Medium),
        Font(Res.font.MaterialSymbolsSharp_Filled_SemiBold, weight = FontWeight.SemiBold),
        Font(Res.font.MaterialSymbolsSharp_Filled_Bold, weight = FontWeight.Bold),
    )

@Composable
internal fun SymbolsRoundedFontFamily() =
    FontFamily(
        Font(Res.font.MaterialSymbolsRounded_ExtraLight, weight = FontWeight.ExtraLight),
        Font(Res.font.MaterialSymbolsRounded_Light, weight = FontWeight.Light),
        Font(Res.font.MaterialSymbolsRounded_Regular, weight = FontWeight.Normal),
        Font(Res.font.MaterialSymbolsRounded_Medium, weight = FontWeight.Medium),
        Font(Res.font.MaterialSymbolsRounded_SemiBold, weight = FontWeight.SemiBold),
        Font(Res.font.MaterialSymbolsRounded_Bold, weight = FontWeight.Bold),
    )

@Composable
internal fun SymbolsRoundedFilledFontFamily() =
    FontFamily(
        Font(Res.font.MaterialSymbolsRounded_Filled_ExtraLight, weight = FontWeight.ExtraLight),
        Font(Res.font.MaterialSymbolsRounded_Filled_Light, weight = FontWeight.Light),
        Font(Res.font.MaterialSymbolsRounded_Filled_Regular, weight = FontWeight.Normal),
        Font(Res.font.MaterialSymbolsRounded_Filled_Medium, weight = FontWeight.Medium),
        Font(Res.font.MaterialSymbolsRounded_Filled_SemiBold, weight = FontWeight.SemiBold),
        Font(Res.font.MaterialSymbolsRounded_Filled_Bold, weight = FontWeight.Bold),
    )

@Composable
internal fun SymbolsOutlinedFontFamily() =
    FontFamily(
        Font(Res.font.MaterialSymbolsOutlined_ExtraLight, weight = FontWeight.ExtraLight),
        Font(Res.font.MaterialSymbolsOutlined_Light, weight = FontWeight.Light),
        Font(Res.font.MaterialSymbolsOutlined_Regular, weight = FontWeight.Normal),
        Font(Res.font.MaterialSymbolsOutlined_Medium, weight = FontWeight.Medium),
        Font(Res.font.MaterialSymbolsOutlined_SemiBold, weight = FontWeight.SemiBold),
        Font(Res.font.MaterialSymbolsOutlined_Bold, weight = FontWeight.Bold),
    )

@Composable
internal fun SymbolsOutlinedFilledFontFamily() =
    FontFamily(
        Font(Res.font.MaterialSymbolsOutlined_Filled_ExtraLight, weight = FontWeight.ExtraLight),
        Font(Res.font.MaterialSymbolsOutlined_Filled_Light, weight = FontWeight.Light),
        Font(Res.font.MaterialSymbolsOutlined_Filled_Regular, weight = FontWeight.Normal),
        Font(Res.font.MaterialSymbolsOutlined_Filled_Medium, weight = FontWeight.Medium),
        Font(Res.font.MaterialSymbolsOutlined_Filled_SemiBold, weight = FontWeight.SemiBold),
        Font(Res.font.MaterialSymbolsOutlined_Filled_Bold, weight = FontWeight.Bold),
    )

internal fun getPlatformIcon(
    android: String,
    ios: String,
) = when (Platform.getType()) {
    PlatformTypes.IOS -> ios
    PlatformTypes.Android -> android
}
