import type { AssetName } from "./assets";

export type RichNode =
  | { type: "text"; text: string }
  | { type: "br" }
  | { type: "p" | "strong" | "em" | "ul" | "ol" | "li"; children: RichNode[] }
  | { type: "a"; href: string; children: RichNode[] };
export type HeadingContent = {
  title: string;
  eyebrow: string;
  description: RichNode[];
};
export type IconContent = {
  family?: "outline";
  viewBox: string;
  paths: string[];
  glyph: string;
};
export type BenefitContent = {
  title: string;
  description: string;
  icon: IconContent;
};
export type StepContent = HeadingContent & { image: AssetName };
export type TestimonialContent = {
  name: string;
  product: string;
  quote: RichNode[];
};
export type FAQContent = { question: string; answer: RichNode[] };
export type HomeContent = {
  hero: HeadingContent;
  heroImage: AssetName;
  values: (HeadingContent & { image: AssetName })[];
  intro: HeadingContent;
  stepsHeading: HeadingContent;
  steps: StepContent[];
  servicesHeading: HeadingContent;
  services: {
    title: string;
    description: string;
    image: AssetName;
    href: string;
    icon: IconContent;
  }[];
  testimonialHeading: HeadingContent;
  testimonials: TestimonialContent[];
  whyHeading: HeadingContent;
  benefits: BenefitContent[];
  cta: string;
};
export type LoanContent = {
  slug: string;
  metadataTitle: string;
  hero: HeadingContent;
  intro: HeadingContent;
  image: AssetName;
  highlights: string[];
  benefitsHeading: HeadingContent;
  benefits: BenefitContent[];
  cta: string;
  ctaLabel: string;
  faqHeading: HeadingContent;
  faqs: FAQContent[];
  stepsHeading: HeadingContent;
  steps: StepContent[];
  testimonialHeading: HeadingContent;
  testimonials: TestimonialContent[];
};
export type AboutContent = {
  hero: HeadingContent;
  sections: (HeadingContent & { image: AssetName })[];
  missionHeading: HeadingContent;
  missions: BenefitContent[];
  cta: string;
  ctaLabel: string;
  testimonialHeading: HeadingContent;
  testimonials: TestimonialContent[];
};
