import { MealTime } from '../response/meal.interface';

export interface GetMeals {
  date: string;
}

export interface MealTimeFilters {
  page: number;
  search_by_name: string;
  ids: MealTime['id'][];
}

interface EditedItem {
  id: number;
  delete?: boolean;
}

export interface EditedFood extends EditedItem {
  quantity: number;
}

export interface EditedRecipe extends EditedItem {
  consumedServings: number;
}

export interface EditMeal {
  date: string;
  foods?: EditedFood[];
  recipes?: EditedRecipe[];
}

interface AddedItem {
  id: number;
}

export interface AddedFood extends AddedItem {
  quantity: number;
}

export interface AddedRecipe extends AddedItem {
  consumedServings: number;
}

export interface CreateMeal {
  date: string;
  mealTimeId: number;
  foods: AddedFood[];
  recipes: AddedRecipe[];
}
