package dev.ulfrx.recipe.ui.screens.mealplaneditor

import dev.ulfrx.recipe.ui.components.recipe.MealSlot
import dev.ulfrx.recipe.ui.components.recipe.RecipeUi
import kotlinx.datetime.LocalDate

internal const val MIN_PLAN_SERVINGS = 1
internal const val MAX_PLAN_SERVINGS = 12

sealed interface MealPlanEditorState {
    data object NotFound : MealPlanEditorState

    data class Editing(
        val id: String,
        val recipe: RecipeUi,
        val selectedDate: LocalDate,
        val selectedSlot: MealSlot,
        val calendarExpanded: Boolean = false,
        val servings: Int = MIN_PLAN_SERVINGS,
        val substitutions: Map<String, String> = emptyMap(),
        val excludedIngredients: Set<String> = emptySet(),
        val addedIngredients: List<AddedIngredientUi> = emptyList(),
    ) : MealPlanEditorState
}
