/**
 * Seed: datadriven Season & Events Engine (spec §28).
 * Datumregler beräknas av recommendation-engine (midsommar, påsk, advent).
 */

export interface SeedSeasonEvent {
  id: string;
  slug: string;
  nameSv: string;
  market: string;
  dateRule:
    | { kind: "fixed"; monthDay: string }
    | { kind: "range"; startMonthDay: string; endMonthDay: string }
    | { kind: "computed"; algorithm: "midsummer" | "easter" | "advent" | "custom" };
  leadDays: number;
  foodTags: string[];
  recipeSlugs: string[];
  priority: number;
}

export const SEED_SEASON_EVENTS: SeedSeasonEvent[] = [
  {
    id: "se-midsommar",
    slug: "midsommar",
    nameSv: "Midsommar",
    market: "SE",
    dateRule: { kind: "computed", algorithm: "midsummer" },
    leadDays: 10,
    foodTags: ["sill", "färskpotatis", "jordgubbar", "grillat", "västerbottensostpaj"],
    recipeSlugs: ["sill-och-farskpotatis", "vasterbottensostpaj", "kottbullar-med-potatismos"],
    priority: 100,
  },
  {
    id: "se-jul",
    slug: "jul",
    nameSv: "Jul",
    market: "SE",
    dateRule: { kind: "range", startMonthDay: "12-20", endMonthDay: "12-26" },
    leadDays: 21,
    foodTags: ["julbord", "köttbullar", "janssons", "sill", "skinka"],
    recipeSlugs: ["jansons-frestelse", "kottbullar-med-potatismos"],
    priority: 100,
  },
  {
    id: "se-pask",
    slug: "påsk",
    nameSv: "Påsk",
    market: "SE",
    dateRule: { kind: "computed", algorithm: "easter" },
    leadDays: 10,
    foodTags: ["ägg", "sill", "lamm", "lax"],
    recipeSlugs: ["sill-och-farskpotatis", "ugnsbakad-lax-med-citron-och-dill"],
    priority: 90,
  },
  {
    id: "se-nyar",
    slug: "nyår",
    nameSv: "Nyårsafton",
    market: "SE",
    dateRule: { kind: "fixed", monthDay: "12-31" },
    leadDays: 7,
    foodTags: ["fest", "skaldjur", "lyx"],
    recipeSlugs: [],
    priority: 80,
  },
  {
    id: "se-kraftskiva",
    slug: "kraftskiva",
    nameSv: "Kräftskivepremiär",
    market: "SE",
    dateRule: { kind: "range", startMonthDay: "08-01", endMonthDay: "08-31" },
    leadDays: 7,
    foodTags: ["kräftor", "västerbottensostpaj", "knäckebröd"],
    recipeSlugs: ["vasterbottensostpaj"],
    priority: 70,
  },
  {
    id: "se-surstromming",
    slug: "surstromming",
    nameSv: "Surströmmingspremiär",
    market: "SE",
    dateRule: { kind: "fixed", monthDay: "08-15" },
    leadDays: 5,
    foodTags: ["surströmming", "tunnbröd", "mandelpotatis"],
    recipeSlugs: [],
    priority: 40,
  },
  {
    id: "se-lucia",
    slug: "lucia",
    nameSv: "Lucia",
    market: "SE",
    dateRule: { kind: "fixed", monthDay: "12-13" },
    leadDays: 7,
    foodTags: ["lussekatter", "pepparkakor", "glögg"],
    recipeSlugs: [],
    priority: 60,
  },
  {
    id: "se-valborg",
    slug: "valborg",
    nameSv: "Valborg",
    market: "SE",
    dateRule: { kind: "fixed", monthDay: "04-30" },
    leadDays: 5,
    foodTags: ["grillat", "vårmat"],
    recipeSlugs: ["halloumiburgare"],
    priority: 50,
  },
  {
    id: "se-grillsasong",
    slug: "grillsasong",
    nameSv: "Grillsäsong",
    market: "SE",
    dateRule: { kind: "range", startMonthDay: "05-15", endMonthDay: "08-31" },
    leadDays: 0,
    foodTags: ["grillat", "sallad", "sommarmat"],
    recipeSlugs: ["halloumiburgare", "grekisk-sallad"],
    priority: 30,
  },
  {
    id: "se-skolstart",
    slug: "skolstart",
    nameSv: "Skolstart",
    market: "SE",
    dateRule: { kind: "range", startMonthDay: "08-10", endMonthDay: "08-31" },
    leadDays: 7,
    foodTags: ["matlåda", "vardagsmat", "snabbt"],
    recipeSlugs: ["spaghetti-med-kottfarssas", "chili-con-carne"],
    priority: 40,
  },
  {
    id: "se-alla-hjartans",
    slug: "alla-hjartans-dag",
    nameSv: "Alla hjärtans dag",
    market: "SE",
    dateRule: { kind: "fixed", monthDay: "02-14" },
    leadDays: 5,
    foodTags: ["middag för två", "lyx", "dessert"],
    recipeSlugs: ["teriyakilax-med-ris"],
    priority: 50,
  },
  {
    id: "int-halloween",
    slug: "halloween",
    nameSv: "Halloween",
    market: "SE",
    dateRule: { kind: "fixed", monthDay: "10-31" },
    leadDays: 7,
    foodTags: ["pumpa", "barnkalas", "höstmat"],
    recipeSlugs: ["tomatsoppa-med-basilika"],
    priority: 40,
  },
  {
    id: "int-oktoberfest",
    slug: "oktoberfest",
    nameSv: "Oktoberfest",
    market: "SE",
    dateRule: { kind: "range", startMonthDay: "09-20", endMonthDay: "10-05" },
    leadDays: 5,
    foodTags: ["korv", "surkål", "öl"],
    recipeSlugs: [],
    priority: 20,
  },
  {
    id: "int-thanksgiving",
    slug: "thanksgiving",
    nameSv: "Thanksgiving",
    market: "US",
    dateRule: { kind: "range", startMonthDay: "11-20", endMonthDay: "11-28" },
    leadDays: 10,
    foodTags: ["kalkon", "pumpapaj"],
    recipeSlugs: [],
    priority: 90,
  },
  {
    id: "int-ramadan-eid",
    slug: "eid",
    nameSv: "Eid al-Fitr",
    market: "SE",
    // Rörligt datum (månkalender) – uppdateras årligen av admin tills kalenderconnector finns.
    dateRule: { kind: "computed", algorithm: "custom" },
    leadDays: 14,
    foodTags: ["fest", "lamm", "dadlar", "sötsaker"],
    recipeSlugs: [],
    priority: 90,
  },
];
