package com.pixelized.biblib.ui.theme.dimen

import androidx.compose.runtime.Immutable
import androidx.compose.runtime.Stable
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.DpSize
import androidx.compose.ui.unit.dp

@Stable
@Immutable
data class BibLibDimen(
    val avatar: Avatar = Avatar(),
    val progress: Progress = Progress(),
    val handle: Handle = Handle(),
    val detail: BookDetail = BookDetail(),
    val thumbnail: BookThumbnail = BookThumbnail(),
) {
    @Stable
    @Immutable
    data class Avatar(
        val medium: Dp = 32.dp,
    )

    @Stable
    @Immutable
    data class Progress(
        val iconSize: Dp = 52.dp,
    )

    @Stable
    @Immutable
    data class Handle(
        val width: Dp = 32.dp,
        val thickness: Dp = 4.dp,
    )

    @Stable
    @Immutable
    data class BookDetail(
        val placeHolder: Dp = 64.dp,
        val cover: Dp = 384.dp,
    )

    @Stable
    @Immutable
    data class BookThumbnail(
        val ratio: Float = 1.6f,
        val padding: Dp = 16.dp,
        val arrangement: Dp = 12.dp,
        val cover: DpSize = 72.dp.let { DpSize(width = it, height = it * ratio) },
        val micro: DpSize = 50.dp.let { DpSize(width = it, height = it * ratio) },
    )
}