package dev.ulfrx.recipe.ui.components.recipe

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import dev.ulfrx.recipe.ui.theme.RecipeTheme

/**
 * Thin separator drawn between consecutive [IngredientRow]s inside the
 * shared wrapping ingredient card. Inset matches the row's horizontal
 * padding so the line never reaches the card's rounded edges.
 */
@Composable
fun IngredientDivider(modifier: Modifier = Modifier) {
    Box(
        modifier =
            modifier
                .fillMaxWidth()
                .padding(horizontal = DividerHorizontalInset)
                .height(DividerThickness)
                .background(RecipeTheme.colors.separator),
    )
}

private val DividerHorizontalInset = 12.dp
private val DividerThickness = 1.dp
