// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown
// SPDX-License-Identifier: GPL-3.0-or-later

package space.rcmd.android.sizzle.ui

import android.content.res.Configuration
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalConfiguration

/**
 * True when the device is currently in landscape orientation. Drives the app's
 * side-by-side landscape layouts (a side nav rail, the tracker/toolbox split into
 * columns) so wide, short screens — tablets, handheld consoles — use the space
 * horizontally instead of squashing everything into short vertical bands.
 *
 * The Activity handles rotation itself (configChanges), so [LocalConfiguration]
 * updates and recomposes callers on every orientation change.
 */
@Composable
fun isLandscape(): Boolean =
    LocalConfiguration.current.orientation == Configuration.ORIENTATION_LANDSCAPE
