import * as verticals from "@/content/verticals/all";
import type { ContactTopic, SiteConfig, Vertical } from "@/types";

export const siteConfig: SiteConfig = {
  name: "Jenado Unlimited",
  tagline:
    "Craft for mind, body, and soul — local honey, training, sourdough, and more.",
  contactEmail: "contact@jenado-unlimited.com",
  contactPhone: "(920) 284-6299",
  siteUrl: process.env.NEXT_PUBLIC_SITE_URL || "http://localhost:3000",
};

export const contactTopics: Array<{ value: ContactTopic; label: string }> = [
  { value: "general", label: "General Inquiry" },
  { value: "honey-bees", label: "Honey Bees" },
  { value: "personal-training", label: "Personal Training" },
  { value: "sourdough", label: "Sourdough Breads" },
  { value: "farm-to-table", label: "Farm-to-Table" },
  { value: "recreation-apps", label: "Recreation Apps" },
  { value: "laser-engraving", label: "Laser Engraving" },
  { value: "3d-printing", label: "3D Printing" },
];

export function getAllVerticals(): Vertical[] {
  return Object.values(verticals).sort((a, b) =>
    a.title.localeCompare(b.title),
  );
}

export function getVerticalBySlug(slug: string): Vertical | undefined {
  const vertical = Object.values(verticals).find(
    (v) => v.slug === (slug as typeof v.slug),
  );
  return vertical;
}

export function getRelatedVerticals(slug: string, limit = 3): Vertical[] {
  return getAllVerticals()
    .filter((v) => v.slug !== slug)
    .slice(0, limit);
}
