export type IngredientKind = "item" | "section_header";

export interface Ingredient {
  id?: number;
  kind: IngredientKind;
  quantity?: string | null;
  unit?: string | null;
  text: string;
}

export interface Step {
  id?: number;
  text: string;
}

export interface RecipeSummary {
  id: number;
  name: string;
  slug: string;
  category?: string | null;
  image_filename?: string | null;
}

export interface Recipe extends RecipeSummary {
  preptime?: string | null;
  cooktime?: string | null;
  baketime?: string | null;
  cooltime?: string | null;
  marinade_time?: string | null;
  robot_time?: string | null;
  servings?: string | null;
  notes?: string | null;
  kcal?: string | null;
  kh?: string | null;
  protein?: string | null;
  fett?: string | null;
  created_at: string;
  updated_at: string;
  ingredients: Ingredient[];
  steps: Step[];
}

export interface RecipeInput {
  name: string;
  category?: string | null;
  preptime?: string | null;
  cooktime?: string | null;
  baketime?: string | null;
  cooltime?: string | null;
  marinade_time?: string | null;
  robot_time?: string | null;
  servings?: string | null;
  notes?: string | null;
  kcal?: string | null;
  kh?: string | null;
  protein?: string | null;
  fett?: string | null;
  ingredients: Ingredient[];
  steps: Step[];
}
