import type { CreateRecipeInput } from '../types/recipe.js';
// ...other necessary imports...
// Dummy extract/logic: Map string[] to normalized CreateRecipeInput.ingredients
export function parseHeuristicRecipe(plainRecipe: { title: string; description?: string; ingredients: string[]; steps: string[]; source_url?: string; image_url?: string }): CreateRecipeInput {
  return {
    title: plainRecipe.title,
    description: plainRecipe.description,
    ingredients: plainRecipe.ingredients.map(item => ({ item })),
    steps: plainRecipe.steps.map(instruction => ({ instruction })),
    source_url: plainRecipe.source_url,
    image_url: plainRecipe.image_url,
  };
}
