package com.devlab.app.ui.theme

import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.*
import androidx.compose.runtime.Composable

private val LightColorScheme = lightColorScheme(
    primary = Blue700,
    onPrimary = White,
    primaryContainer = Blue500,
    secondary = Cyan500,
    tertiary = Purple500,
    background = Grey50,
    surface = SurfaceLight,
    surfaceVariant = Grey100,
    error = Red500,
    onBackground = Grey900,
    onSurface = Grey900,
    onSurfaceVariant = Grey700,
    outline = Grey300
)

private val DarkColorScheme = darkColorScheme(
    primary = Blue500,
    onPrimary = White,
    primaryContainer = Blue700,
    secondary = Cyan500,
    tertiary = Purple500,
    background = DarkBackground,
    surface = DarkSurface,
    surfaceVariant = DarkSurfaceVariant,
    error = Red500,
    onBackground = White,
    onSurface = White,
    onSurfaceVariant = Grey300,
    outline = Grey500
)

@Composable
fun ServerManagerTheme(
    darkTheme: Boolean = isSystemInDarkTheme(),
    content: @Composable () -> Unit
) {
    val colorScheme = if (darkTheme) DarkColorScheme else LightColorScheme

    MaterialTheme(
        colorScheme = colorScheme,
        typography = Typography,
        content = content
    )
}
