package com.horrortv.app.presentation.theme

import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme
import androidx.compose.runtime.Composable
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

private val HorrorColorScheme = darkColorScheme(
    primary = HorrorColors.HorrorRed,
    secondary = HorrorColors.HorrorAccent,
    tertiary = HorrorColors.HorrorGray,
    background = HorrorColors.HorrorBlack,
    surface = HorrorColors.HorrorDarkGray,
    onPrimary = HorrorColors.HorrorWhite,
    onSecondary = HorrorColors.HorrorWhite,
    onTertiary = HorrorColors.HorrorWhite,
    onBackground = HorrorColors.HorrorWhite,
    onSurface = HorrorColors.HorrorWhite
)

private val HorrorTypographyConfig = androidx.compose.material3.Typography(
    displayLarge = HorrorTypography.DetailTitle,
    displayMedium = HorrorTypography.CategoryTitle,
    displaySmall = HorrorTypography.MovieTitle,
    headlineLarge = HorrorTypography.CategoryTitle,
    headlineMedium = HorrorTypography.MovieTitle,
    headlineSmall = HorrorTypography.MovieYear,
    titleLarge = HorrorTypography.MovieTitle,
    titleMedium = HorrorTypography.DetailInfo,
    titleSmall = HorrorTypography.MovieYear,
    bodyLarge = HorrorTypography.DetailPlot,
    bodyMedium = HorrorTypography.DetailInfo,
    bodySmall = HorrorTypography.SearchHint,
    labelLarge = HorrorTypography.PlayButton,
    labelMedium = HorrorTypography.DetailInfo,
    labelSmall = HorrorTypography.MovieYear
)

@Composable
fun HorrorTheme(
    darkTheme: Boolean = true,
    content: @Composable () -> Unit
) {
    MaterialTheme(
        colorScheme = HorrorColorScheme,
        typography = HorrorTypographyConfig,
        content = content
    )
}