import { serviceCatalog } from "@/content/catalog";
import { resourceCatalog } from "@/content/resources/catalog";
import { getServices } from "@/lib/content";

export interface OgEntry {
  key: string;
  eyebrow: string;
  title: string;
}

/** One entry per page that references /og/<key> in its metadata. */
export function getOgEntries(): OgEntry[] {
  const services = getServices();
  return [
    { key: "home", eyebrow: "Growth marketing for SaaS + e-commerce", title: "Growth marketing built around revenue, not channel metrics." },
    { key: "industry-saas", eyebrow: "SaaS growth marketing", title: "Built for pipeline, CAC payback, and trial and demo conversion." },
    { key: "industry-ecommerce", eyebrow: "E-commerce growth marketing", title: "Built on MER, contribution margin, and repeat purchase." },
    { key: "how-we-work", eyebrow: "How we work", title: "The Revenue Circuit: from diagnosis to scale." },
    { key: "about", eyebrow: "About", title: "Marketing should make the business easier to understand." },
    { key: "resources", eyebrow: "Resources", title: "Practical guides for SaaS and e-commerce growth teams." },
    { key: "growth-audit", eyebrow: "Growth Audit", title: "Find the constraint before spending more to scale it." },
    { key: "contact", eyebrow: "Contact", title: "Talk to Axidys Media." },
    { key: "privacy", eyebrow: "Legal", title: "Privacy policy." },
    { key: "terms", eyebrow: "Legal", title: "Terms of service." },
    { key: "cookie-policy", eyebrow: "Legal", title: "Cookie policy." },
    { key: "cookie-preferences", eyebrow: "Legal", title: "Cookie preferences." },
    ...serviceCatalog.map((summary) => ({
      key: `service-${summary.slug}`,
      eyebrow: summary.name,
      title: services.find((service) => service.slug === summary.slug)?.hero.title ?? summary.shortDescription,
    })),
    ...resourceCatalog.map((resource) => ({
      key: `resource-${resource.slug}`,
      eyebrow: `${resource.category} · ${resource.format}`,
      title: resource.title,
    })),
  ];
}
