package it.vfsfitvnm.vimusic.ui.styling

import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp


@Suppress("ClassName")
object Dimensions {
    object thumbnails {
        val album = 128.dp
        val artist = 192.dp
        val song = 54.dp
        val playlist = album

        object player {
            val songPreview = collapsedPlayer
            val song: Dp
                @Composable
                get() = with (LocalConfiguration.current) {
                    minOf(screenHeightDp, screenWidthDp)
                }.dp
        }
    }

    val collapsedPlayer = 64.dp
}

inline val Dp.px: Int
    @Composable
    inline get() = with (LocalDensity.current) { roundToPx() }
