package dev.ulfrx.recipe.ui.screens.shell

import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.navigationBars
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import dev.ulfrx.recipe.ui.theme.RecipeTheme

internal val DockBandHeight: Dp = 63.dp

@Composable
fun rememberShellChromeHeight(): Dp {
    val spacing = RecipeTheme.spacing
    val navBottom =
        with(LocalDensity.current) {
            (WindowInsets.navigationBars.getBottom(this) / 2).toDp()
        }
    return navBottom + spacing.xs + DockBandHeight + spacing.sm
}
