package com.ys.bdtp.adm.mvvm.ui.compose

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.width
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.ys.bdtp.adm.app.theme.divColor

sealed interface Div {
    object Row : Div
    object Col : Div
}

@Composable
fun Div(div: Div = Div.Row, size: Dp = 1.dp) {
    when (div) {
        Div.Row -> Spacer(modifier = Modifier.fillMaxWidth().height(size).background(divColor))
        Div.Col -> Spacer(modifier = Modifier.fillMaxHeight().width(size).background(divColor))
    }
}