package de.softwareapp_hb.privateqrscanner.ui.theme

import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable

private val LightColors = lightColorScheme(
    primary = PrivateQrColors.Teal700,
    onPrimary = PrivateQrColors.Surface,
    secondary = PrivateQrColors.Teal300,
    onSecondary = PrivateQrColors.Navy,
    background = PrivateQrColors.AppBackground,
    onBackground = PrivateQrColors.TextPrimary,
    surface = PrivateQrColors.Surface,
    onSurface = PrivateQrColors.TextPrimary,
    surfaceVariant = PrivateQrColors.Mint,
    onSurfaceVariant = PrivateQrColors.TextSecondary
)

private val DarkColors = darkColorScheme(
    primary = PrivateQrColors.Teal300,
    onPrimary = PrivateQrColors.Navy,
    secondary = PrivateQrColors.Mint,
    onSecondary = PrivateQrColors.Navy,
    background = PrivateQrColors.Deep,
    onBackground = PrivateQrColors.Surface,
    surface = PrivateQrColors.Navy,
    onSurface = PrivateQrColors.Surface,
    surfaceVariant = PrivateQrColors.Teal900,
    onSurfaceVariant = PrivateQrColors.Mint
)

@Composable
fun CleanScannerTheme(content: @Composable () -> Unit) {
    val darkTheme = isSystemInDarkTheme()
    val colorScheme = if (darkTheme) DarkColors else LightColors

    MaterialTheme(
        colorScheme = colorScheme,
        content = content
    )
}
