package ru.forbion.f7cloud.core.designsystem

import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.WindowInsetsSides
import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.layout.only
import androidx.compose.foundation.layout.safeDrawing
import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier

/** Top + horizontal safe area (status bar, display cutout on foldables / punch-hole). */
@Composable
fun Modifier.f7SafeTopInsets(): Modifier = windowInsetsPadding(
    WindowInsets.safeDrawing.only(WindowInsetsSides.Top + WindowInsetsSides.Horizontal),
)

/** Bottom navigation bar / gesture area when the app bottom bar is hidden. */
@Composable
fun Modifier.f7SafeBottomInsets(): Modifier = windowInsetsPadding(
    WindowInsets.navigationBars,
)
