import { publicPath, type Locale } from "@/lib/seo/slugs";

export type { Locale };

export type SeoPageRef = {
  href: (lang: Locale) => string;
  eyebrow: Record<Locale, string>;
  title: Record<Locale, string>;
  description: Record<Locale, string>;
};

/** Canonical catalog of indexable marketing URLs used for internal linking. */
export const seoCatalog = {
  home: {
    href: (lang: Locale) => `/${lang}`,
    eyebrow: { de: "PRODUKT", en: "PRODUCT" },
    title: {
      de: "ScanReceipts: Belege scannen und nach Excel exportieren",
      en: "ScanReceipts: scan receipts and export to Excel",
    },
    description: {
      de: "Foto machen, KI liest aus, Math-Check prüft jede Summe – Excel, CSV oder PDF in Sekunden.",
      en: "Snap a photo, AI extracts the data, a math-check verifies every total — Excel, CSV or PDF in seconds.",
    },
  },
  ocr: {
    href: (lang: Locale) => publicPath(lang, "ocr-receipt-scanner"),
    eyebrow: { de: "KI-BELEG-OCR", en: "AI OCR ENGINE" },
    title: {
      de: "KI-Beleg-OCR: Kassenbons automatisch auslesen",
      en: "AI OCR receipt scanner: turn any receipt into clean data",
    },
    description: {
      de: "Wie multimodale KI plus deterministischer Rechen-Check aus einem Foto strukturierte Belegdaten macht.",
      en: "How multimodal AI plus a deterministic math-check turns a photo into structured receipt data.",
    },
  },
  freelancer: {
    href: (lang: Locale) => publicPath(lang, "expense-tracker-freelancers"),
    eyebrow: { de: "FÜR SELBSTSTÄNDIGE", en: "FOR FREELANCERS" },
    title: {
      de: "Ausgaben-Tracker für Selbstständige und Freelancer",
      en: "Expense tracker built for freelancers and the self-employed",
    },
    description: {
      de: "Belege fotografieren statt abtippen – für Beratung, Handwerk, Design und Nebenberuf.",
      en: "Photograph receipts instead of typing them — for consulting, trades, design and side hustles.",
    },
  },
  expensify: {
    href: (lang: Locale) => publicPath(lang, "expensify-alternative"),
    eyebrow: { de: "VERGLEICH", en: "COMPARISON" },
    title: {
      de: "Expensify-Alternative mit direktem Excel-Export",
      en: "Expensify alternative built around receipt-to-Excel export",
    },
    description: {
      de: "Wann eine schlanke Scanner-App reicht – und wann du wirklich eine Spesen-Suite brauchst.",
      en: "When a slim scanner is enough — and when you actually need a full expense suite.",
    },
  },
  lexoffice: {
    href: (lang: Locale) => publicPath(lang, "lexoffice-alternative"),
    eyebrow: { de: "VERGLEICH", en: "COMPARISON" },
    title: {
      de: "Lexoffice-Alternative für schnelles Belege-Scannen",
      en: "Lexoffice alternative for fast receipt digitization",
    },
    description: {
      de: "ScanReceipts als schneller Erfassungsschritt vor Lexoffice oder sevDesk – kein Entweder-oder.",
      en: "ScanReceipts as the fast capture step ahead of Lexoffice or sevDesk — not either/or.",
    },
  },
  blog: {
    href: (lang: Locale) => `/${lang}/blog`,
    eyebrow: { de: "BLOG", en: "BLOG" },
    title: {
      de: "Blog: Belege scannen und OCR – praktisch erklärt",
      en: "Blog: receipt scanning and OCR, explained practically",
    },
    description: {
      de: "Guides zu OCR, Excel-Export, Organisation und Ausgabenverfolgung.",
      en: "Guides on OCR, Excel export, organizing receipts and expense tracking.",
    },
  },
  ocrBlog: {
    href: (lang: Locale) => publicPath(lang, "blog/how-receipt-ocr-works"),
    eyebrow: { de: "TECHNIK ERKLÄRT", en: "TECHNICAL EXPLAINER" },
    title: {
      de: "So funktioniert Beleg-OCR wirklich",
      en: "How receipt OCR actually works",
    },
    description: {
      de: "Warum Thermopapier schwer zu lesen ist und warum ein Rechen-Check nach der KI zählt.",
      en: "Why thermal paper is hard to read and why an arithmetic check after AI extraction matters.",
    },
  },
  scanningVsManual: {
    href: (lang: Locale) => publicPath(lang, "blog/receipt-scanning-vs-manual-bookkeeping"),
    eyebrow: { de: "BELEGE ERFASSEN", en: "RECEIPT CAPTURE" },
    title: {
      de: "Kassenbon scannen statt abtippen",
      en: "Receipt scanning vs. manual data entry",
    },
    description: {
      de: "Was das Abtippen wirklich an Zeit und Fehlern kostet – ehrlich, ohne pauschale Stundenzahl.",
      en: "What typing receipts actually costs in time and errors — honest, without a fake hour-count.",
    },
  },
  excelGuide: {
    href: (lang: Locale) => publicPath(lang, "blog/receipt-to-excel-guide"),
    eyebrow: { de: "PRAKTISCHER RATGEBER", en: "PRACTICAL GUIDE" },
    title: {
      de: "Kassenbon in Excel umwandeln",
      en: "Receipt to Excel: photo to spreadsheet",
    },
    description: {
      de: "Vom Foto zur strukturierten Tabelle – und warum eine leere Vorlage das Problem nicht löst.",
      en: "From photo to a structured spreadsheet — and why a blank template does not solve the real problem.",
    },
  },
  organize: {
    href: (lang: Locale) => publicPath(lang, "blog/organize-digital-receipts"),
    eyebrow: { de: "ORGANISATION", en: "GETTING ORGANIZED" },
    title: {
      de: "Belege digitalisieren und organisieren",
      en: "How to digitize and organize receipts",
    },
    description: {
      de: "Warum Papier verblasst und ein Foto allein noch keine durchsuchbare Ablage ist.",
      en: "Why paper fades and a photo alone is not a searchable archive.",
    },
  },
  simpleTracking: {
    href: (lang: Locale) => publicPath(lang, "blog/simple-expense-tracking"),
    eyebrow: { de: "AUSGABEN & GEWOHNHEITEN", en: "SPENDING & HABITS" },
    title: {
      de: "Einfache Ausgabenverfolgung, die hält",
      en: "Simple expense tracking that actually sticks",
    },
    description: {
      de: "Warum die meisten Tracker-Apps nach zwei Wochen sterben – und was stattdessen funktioniert.",
      en: "Why most tracker apps die after two weeks — and what actually works instead.",
    },
  },
} as const satisfies Record<string, SeoPageRef>;

export type SeoCatalogKey = keyof typeof seoCatalog;
