import type { MealCategory } from "./recipe.types";

export interface CreateIngredientInput {
  name: string;
  amountGrams: number | null;
  unit: string;
  sortOrder: number;
  catalogItemId?: number | null;
}

export interface CreateStepInput {
  stepNumber: number;
  description: string;
}

export interface CreateRecipeInput {
  name: string;
  mealCategory: MealCategory;
  calories: number | null;
  protein: number | null;
  fat: number | null;
  carbs: number | null;
  prepTimeMinutes: number | null;
  ingredients: CreateIngredientInput[];
  steps: CreateStepInput[];
}

export interface RecipeImportResult {
  createdCount: number;
  skippedCount: number;
  errors: string[];
  createdRecipeIds: number[];
}

export interface RecipeMacroRecalcResult {
  recipesProcessed: number;
  recipesUpdated: number;
  unlinkedIngredientRows: number;
}

export interface RecalculateRecipeCaloriesResult {
  recipeId: number;
  previousCalories?: number | null;
  targetCalories: number;
  newCalories?: number | null;
  newProtein?: number | null;
  newFat?: number | null;
  newCarbs?: number | null;
  applied: boolean;
  method: string;
  unlinkedIngredientCount: number;
  ingredients: import("./recipe.types").Ingredient[];
  recipe?: import("./recipe.types").RecipeDetail | null;
}
