package dev.ulfrx.recipe.ui.screens.planner

import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import dev.ulfrx.recipe.ui.components.calendar.RecipeCalendarPill
import dev.ulfrx.recipe.ui.components.calendar.todayInSystemTz
import kotlinx.datetime.DatePeriod
import kotlinx.datetime.LocalDate
import kotlinx.datetime.plus

/**
 * Planner-screen flavour of [RecipeCalendarPill] — supplies the dummy
 * "you already have something planned" indicators that will be replaced by
 * real planner data in Phase 6.
 */
@Composable
fun PlannerCalendarPill(
    selectedDate: LocalDate,
    expanded: Boolean,
    onExpandedChange: (Boolean) -> Unit,
    onSelectDate: (LocalDate) -> Unit,
    onShiftSelection: (LocalDate) -> Unit,
    modifier: Modifier = Modifier,
) {
    val plannedDummy =
        remember {
            val today = todayInSystemTz()
            setOf(today, today.plus(DatePeriod(days = 1)), today.plus(DatePeriod(days = 3)))
        }

    RecipeCalendarPill(
        selectedDate = selectedDate,
        expanded = expanded,
        onExpandedChange = onExpandedChange,
        onSelectDate = onSelectDate,
        onSelectionShift = onShiftSelection,
        plannedDates = plannedDummy,
        modifier = modifier,
    )
}
