package com.laseroptek.raman.utils.ext

import android.content.res.Configuration.UI_MODE_NIGHT_YES
import androidx.compose.ui.tooling.preview.Preview

/**
 * Add this multipreview annotation to a composable to render the composable in extra small and
 * extra large font size.
 *
 * Read more in the [documentation](https://d.android.com/jetpack/compose/tooling#preview-multipreview)
 */
@Preview(
    name = "small font",
    group = "font scales",
    fontScale = 0.5f,
    device = "spec:width=1920dp,height=1080dp,dpi=150,isRound=false,chinSize=0dp,orientation=landscape"
)
@Preview(
    name = "large font",
    group = "font scales",
    fontScale = 1.5f,
    device = "spec:width=1920dp,height=1080dp,dpi=150,isRound=false,chinSize=0dp,orientation=landscape"
)
annotation class FontScalePreviews

/**
 * Add this multipreview annotation to a composable to render the composable on various device
 * sizes: phone, foldable, and tablet.
 *
 * Read more in the [documentation](https://d.android.com/jetpack/compose/tooling#preview-multipreview)
 */
@Preview(
    name = "phone",
    group = "devices",
    device = "spec:width=360dp,height=640dp,dpi=480,isRound=false,chinSize=0dp,orientation=landscape"
)
@Preview(
    name = "foldable",
    group = "devices",
    device = "spec:width=673dp,height=841dp,dpi=480,isRound=false,chinSize=0dp,orientation=landscape"
)
@Preview(
    name = "tablet",
    group = "devices",
    device = "spec:width=1280dp,height=800dp,dpi=480,isRound=false,chinSize=0dp,orientation=landscape"
)
annotation class DevicePreviews

/**
 * Add this multipreview annotation to a composable to render the composable in various common
 * configurations:
 * - Dark theme
 * - Small and large font size
 * - various device sizes
 *
 * Read more in the [documentation](https://d.android.com/jetpack/compose/tooling#preview-multipreview)
 *
 * _Note: Combining multipreview annotations doesn't mean all the different combinations are shown.
 * Instead, each multipreview annotation acts by its own and renders only its own variants._
 */
@Preview(
    name = "dark theme",
    group = "themes",
    uiMode = UI_MODE_NIGHT_YES
)
@FontScalePreviews
@DevicePreviews
annotation class CompletePreviews
