import 'inventory_compare_item.dart';
import 'meal_plan_entry.dart';
import 'shopping_item.dart';

class MealPlanDashboard {
  final List<MealPlanEntry> entries;
  final List<ShoppingItem> shoppingItems;
  final List<InventoryCompareItem> inventoryCompareItems;

  const MealPlanDashboard({
    required this.entries,
    required this.shoppingItems,
    required this.inventoryCompareItems,
  });

  MealPlanEntry? entryForDate(DateTime date) {
    final normalized = DateTime(date.year, date.month, date.day);
    for (final entry in entries) {
      final entryDate = DateTime(entry.date.year, entry.date.month, entry.date.day);
      if (entryDate == normalized) {
        return entry;
      }
    }
    return null;
  }
}