package de.krisenvorrat.app.ui.dashboard

import de.krisenvorrat.app.domain.model.CategorySummary
import de.krisenvorrat.app.domain.model.ExpiryWarning

internal data class DashboardUiState(
    val categorySummaries: List<CategorySummary> = emptyList(),
    val totalValue: Double = 0.0,
    val supplyRangeDays: Double = 0.0,
    val expiryWarnings: List<ExpiryWarning> = emptyList(),
    val isLoading: Boolean = true
) {
    val totalItemCount: Int
        get() = categorySummaries.sumOf { it.itemCount }

    val hasExpiryWarnings: Boolean
        get() = expiryWarnings.isNotEmpty()
}
