package com.applemand.zmanim.core.design

import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp

/**
 * Font families.
 *
 * At release time, drop the OFL TTFs into core/design/src/main/res/font/ (see FONTS.md)
 * and swap these three values to the Font(R.font.*) declarations. The Typography
 * shape below does not change.
 */
val PlayfairDisplay: FontFamily = FontFamily.Serif
val Inter: FontFamily = FontFamily.SansSerif
val FrankRuhlLibre: FontFamily = FontFamily.Serif

val LatinTypography = Typography(
    displayLarge = TextStyle(
        fontFamily = PlayfairDisplay, fontWeight = FontWeight.SemiBold,
        fontSize = 57.sp, lineHeight = 64.sp, letterSpacing = (-0.25).sp,
    ),
    displayMedium = TextStyle(
        fontFamily = PlayfairDisplay, fontWeight = FontWeight.SemiBold,
        fontSize = 45.sp, lineHeight = 52.sp,
    ),
    displaySmall = TextStyle(
        fontFamily = PlayfairDisplay, fontWeight = FontWeight.Medium,
        fontSize = 36.sp, lineHeight = 44.sp,
    ),
    headlineLarge = TextStyle(
        fontFamily = PlayfairDisplay, fontWeight = FontWeight.Medium,
        fontSize = 32.sp, lineHeight = 40.sp,
    ),
    headlineMedium = TextStyle(
        fontFamily = PlayfairDisplay, fontWeight = FontWeight.Medium,
        fontSize = 28.sp, lineHeight = 36.sp,
    ),
    headlineSmall = TextStyle(
        fontFamily = PlayfairDisplay, fontWeight = FontWeight.Normal,
        fontSize = 24.sp, lineHeight = 32.sp,
    ),
    titleLarge = TextStyle(
        fontFamily = Inter, fontWeight = FontWeight.SemiBold,
        fontSize = 22.sp, lineHeight = 28.sp,
    ),
    titleMedium = TextStyle(
        fontFamily = Inter, fontWeight = FontWeight.SemiBold,
        fontSize = 16.sp, lineHeight = 24.sp, letterSpacing = 0.15.sp,
    ),
    titleSmall = TextStyle(
        fontFamily = Inter, fontWeight = FontWeight.Medium,
        fontSize = 14.sp, lineHeight = 20.sp, letterSpacing = 0.1.sp,
    ),
    bodyLarge = TextStyle(
        fontFamily = Inter, fontWeight = FontWeight.Normal,
        fontSize = 16.sp, lineHeight = 24.sp, letterSpacing = 0.5.sp,
    ),
    bodyMedium = TextStyle(
        fontFamily = Inter, fontWeight = FontWeight.Normal,
        fontSize = 14.sp, lineHeight = 20.sp, letterSpacing = 0.25.sp,
    ),
    bodySmall = TextStyle(
        fontFamily = Inter, fontWeight = FontWeight.Normal,
        fontSize = 12.sp, lineHeight = 16.sp, letterSpacing = 0.4.sp,
    ),
    labelLarge = TextStyle(
        fontFamily = Inter, fontWeight = FontWeight.SemiBold,
        fontSize = 14.sp, lineHeight = 20.sp, letterSpacing = 0.1.sp,
    ),
    labelMedium = TextStyle(
        fontFamily = Inter, fontWeight = FontWeight.Medium,
        fontSize = 12.sp, lineHeight = 16.sp, letterSpacing = 0.5.sp,
    ),
    labelSmall = TextStyle(
        fontFamily = Inter, fontWeight = FontWeight.Medium,
        fontSize = 11.sp, lineHeight = 16.sp, letterSpacing = 0.5.sp,
    ),
)

val HebrewTypography = Typography(
    displayLarge = LatinTypography.displayLarge.copy(fontFamily = FrankRuhlLibre, fontWeight = FontWeight.Bold),
    displayMedium = LatinTypography.displayMedium.copy(fontFamily = FrankRuhlLibre, fontWeight = FontWeight.Bold),
    displaySmall = LatinTypography.displaySmall.copy(fontFamily = FrankRuhlLibre, fontWeight = FontWeight.Bold),
    headlineLarge = LatinTypography.headlineLarge.copy(fontFamily = FrankRuhlLibre, fontWeight = FontWeight.Medium),
    headlineMedium = LatinTypography.headlineMedium.copy(fontFamily = FrankRuhlLibre, fontWeight = FontWeight.Medium),
    headlineSmall = LatinTypography.headlineSmall.copy(fontFamily = FrankRuhlLibre, fontWeight = FontWeight.Medium),
    titleLarge = LatinTypography.titleLarge.copy(fontFamily = FrankRuhlLibre, fontWeight = FontWeight.Medium),
    titleMedium = LatinTypography.titleMedium.copy(fontFamily = FrankRuhlLibre, fontWeight = FontWeight.Medium),
    titleSmall = LatinTypography.titleSmall.copy(fontFamily = FrankRuhlLibre),
    bodyLarge = LatinTypography.bodyLarge.copy(fontFamily = FrankRuhlLibre),
    bodyMedium = LatinTypography.bodyMedium.copy(fontFamily = FrankRuhlLibre),
    bodySmall = LatinTypography.bodySmall.copy(fontFamily = FrankRuhlLibre),
    labelLarge = LatinTypography.labelLarge.copy(fontFamily = FrankRuhlLibre),
    labelMedium = LatinTypography.labelMedium.copy(fontFamily = FrankRuhlLibre),
    labelSmall = LatinTypography.labelSmall.copy(fontFamily = FrankRuhlLibre),
)
