import type {
  CookingMethod,
  Cuisine,
  Equipment,
  MealType,
  RecipeDifficulty,
  RecipeTag,
  RecipeVariantType,
  Season,
  Unit,
} from "@app/shared-types";

/**
 * Seed: redaktionella originalrecept skrivna för plattformen (sourceType:
 * own_editorial – egna formuleringar, ingen kopierad text, spec §15).
 * Näring + allergener beräknas deterministiskt vid seed ur ingredienserna.
 *
 * Själva receptkatalogen (246 verifierade recept) levereras från
 * verified-recipes.ts så att seed-datan är committad och hermetisk.
 */

export interface SeedRecipeIngredient {
  ing: string; // canonical ingredient id
  nameSv: string;
  qty: number;
  unit: Unit;
  note?: string;
  optional?: boolean;
  group?: string;
}

export interface SeedRecipeStep {
  text: string;
  timerSeconds?: number;
  temperatureC?: number;
  tip?: string;
}

export interface SeedRecipe {
  slug: string;
  titleSv: string;
  descriptionSv: string;
  cuisine: Cuisine;
  country?: string;
  mealTypes: MealType[];
  tags: RecipeTag[];
  methods: CookingMethod[];
  equipment: Equipment[];
  difficulty: RecipeDifficulty;
  prepMin: number;
  cookMin: number;
  portions: number;
  spiceLevel: number;
  mealPrepFriendly: boolean;
  freezerFriendly: boolean;
  peakSeasons: Season[];
  holidayTags: string[];
  variantType?: RecipeVariantType;
  variantOfSlug?: string;
  storageGuidanceSv?: string;
  dnaProtein?: string;
  dnaCarb?: string;
  dnaVegetables: string[];
  dnaFlavor: string[];
  verificationStatus?: "editorial" | "verified" | "unverified" | "community" | "rejected";
  ingredients: SeedRecipeIngredient[];
  steps: SeedRecipeStep[];
}

export { VERIFIED_RECIPES as SEED_RECIPES } from "./verified-recipes.js";
