import type { SectionTitleContent } from "@/data/home/types";
import { PricingMonthlyPlans } from "@/data/pricing/plans";

export type PricingTier = {
  name: string;
  price: string;
  period: string;
  features: string[];
  cta: { label: string; href: string };
  highlighted?: boolean;
};

export type PricingPageCopy = {
  pageTitle: string;
  breadcrumb: string;
  plansIntro: SectionTitleContent;
  tiers: PricingTier[];
  compareIntro: SectionTitleContent;
};

const tiers: PricingTier[] = PricingMonthlyPlans.map((p) => ({
  name: p.name,
  price: p.price,
  period: p.period,
  features: p.features,
  highlighted: p.highlighted,
  cta: { label: p.ctaLabel, href: p.ctaHref },
}));

export const pricingPageCopy: PricingPageCopy = {
  pageTitle: "Pricing",
  breadcrumb: "Plans & pricing",
  plansIntro: {
    title: "Simple, transparent pricing",
    description: "Mapped from pricing.html hero + plans.",
  },
  tiers,
  compareIntro: {
    title: "Compare plans in detail",
    description: "Mapped from pricing.html pricing-compare.",
  },
};
