/**
 * Type definitions for the Strapi integration.
 *
 * `Strapi*`  → raw shapes returned by the Strapi REST API envelope.
 * `*Data`    → clean, flattened shapes consumed by the React components.
 *
 * These mirror the sample content-type blueprint shipped in
 * `strapi/blueprints/homepage.json`.
 */

/* ------------------------------------------------------------------ */
/*  Strapi REST envelope (v4 / v5 compatible)                          */
/* ------------------------------------------------------------------ */

export interface StrapiMediaFormat {
  url: string
  width: number
  height: number
}

export interface StrapiMedia {
  url: string
  alternativeText?: string
  width?: number
  height?: number
  formats?: {
    thumbnail?: StrapiMediaFormat
    small?: StrapiMediaFormat
    medium?: StrapiMediaFormat
    large?: StrapiMediaFormat
  }
}

export interface StrapiResponse<T> {
  data: T[]
  meta?: Record<string, unknown>
}

export interface StrapiSingleResponse<T> {
  data: T | null
  meta?: Record<string, unknown>
}

/** Attributes payload helper for v4-style responses. */
export interface StrapiEntry<T> {
  id: number
  attributes?: T
  [key: string]: unknown
}

/* ------------------------------------------------------------------ */
/*  Clean data shapes consumed by components                          */
/* ------------------------------------------------------------------ */

/** Shared "section header" used across most homepage sections. */
export interface SectionHeader {
  badge?: string
  badgeIcon?: string
  description?: string
}

/* --- Hero Slider --------------------------------------------------- */
export interface HeroSlideData {
  id: number
  heading: string
  description: string
  highlight: string
  backgroundImage: string
  mobileBackgroundImage?: string
  thumbnail: string
  thumbnailAlt: string
}

export interface HeroData {
  slides: HeroSlideData[]
  ctaLabel?: string
  ctaHref?: string
}

/* --- Leadership ---------------------------------------------------- */
export interface LeaderData {
  name: string
  title: string
  image: string
}

export interface LeadershipData {
  header: SectionHeader
  watermarkLines?: string[]
  leaders: LeaderData[]
}

/* --- Vision -------------------------------------------------------- */
export interface VisionStatData {
  icon: string
  value: string
  label: string
}

export interface VisionData {
  header: SectionHeader
  description: string
  image: string
  mobileImage?: string
  stats: VisionStatData[]
}

/* --- Legacy -------------------------------------------------------- */
export interface LegacyData {
  header: SectionHeader
  backgroundImage?: string
  image: string
  description: string
  ctaLabel?: string
  ctaHref?: string
}

/* --- Business Portfolio (Past Ventures) --------------------------- */
export interface BusinessData {
  name: string
  description: string
  image: string
  logo: string
  logoBg: string
}

export interface BusinessPortfolioData {
  header: SectionHeader
  businesses: BusinessData[]
}

/* --- Partners Growth ----------------------------------------------- */
export interface PartnerData {
  name: string
  logo: string
}

export interface PartnersData {
  header: SectionHeader
  partners: PartnerData[]
}

/* --- Glance -------------------------------------------------------- */
export interface GlanceStatData {
  value: string
  label: string
  icon: string
}

export interface GlanceData {
  header: SectionHeader
  stats: GlanceStatData[]
}

/* --- Testimonials -------------------------------------------------- */
export interface TestimonialData {
  quote: string
  name: string
  role: string
  avatar: string
  rating: number
}

export interface TestimonialsData {
  header: SectionHeader
  mobileDescription?: string
  testimonials: TestimonialData[]
}

/* --- Sustainability ------------------------------------------------ */
export interface InitiativeData {
  number: string
  title: string
  description: string
  image: string
}

export interface SustainabilityData {
  header: SectionHeader
  initiatives: InitiativeData[]
}

/* --- Awards -------------------------------------------------------- */
export interface AwardData {
  year: string
  title: string
  image: string
}

export interface AwardsData {
  header: SectionHeader
  watermarkLines?: string[]
  awards: AwardData[]
}

/* --- Event Enquiry ------------------------------------------------- */
export interface EventEnquiryData {
  heading: string
  ctaLabel?: string
  ctaHref?: string
}

/* --- Press Release ------------------------------------------------- */
export interface PressReleaseData {
  id: number
  image: string
  date: string
  title: string
  description: string
  buttonText?: string
  buttonPdf?: string
  buttonLink?: string
}

export interface PressReleaseSectionData {
  header: SectionHeader
  pressReleases: PressReleaseData[]
}

/* --- Philanthropic ------------------------------------------------- */
export interface PhilanthropicActivityData {
  title: string
  highlight: string
  description: string
  image: string
}

export interface PhilanthropicData {
  header: SectionHeader
  watermarkText?: string
  activities: PhilanthropicActivityData[]
}

/* --- Gallery + Newsletter ----------------------------------------- */
export interface GalleryImageData {
  url: string
  alt?: string
}

export interface NewsletterItemData {
  title: string
  date: string
  image: string
  pdfUrl: string
}

export interface GalleryNewsletterData {
  galleryHeader: SectionHeader
  galleryImages: GalleryImageData[]
  newsletterHeader: SectionHeader
  newsletters: NewsletterItemData[]
}

/* --- Partner CTA --------------------------------------------------- */
export interface PartnerCtaData {
  heading: string
  headingLine2?: string
  ctaLabel?: string
  ctaHref?: string
}

/* --- Green Energy -------------------------------------------------- */
export interface GreenEnergyStatCardData {
  icon: string
  title: string
  description: string
}

export interface GreenEnergyHeroData {
  heading: string
  mobileBackgroundImage: string
  desktopBackgroundImage: string
}

export interface GreenEnergyAboutData {
  badge: string
  badgeIcon: string
  mobileWatermarkText: string
  desktopWatermarkText: string
  decorativeImage: string
  paragraphs: string[]
}

export interface GreenEnergyData {
  hero: GreenEnergyHeroData
  stats: GreenEnergyStatCardData[]
  about: GreenEnergyAboutData
}

/* --- SAFL ---------------------------------------------------------- */
export interface SaflHeroData {
  heading: string
  description: string
  mobileBackgroundImage: string
  desktopBackgroundImage: string
}

export interface SaflAboutData {
  badge: string
  badgeIcon: string
  watermarkText: string
  decorativeImage: string
  paragraphs: string[]
}

export interface SaflProductBannerData {
  name: string
  image: string
  mobileImage: string
}

export interface SaflProductCategoryData {
  name: string
  banners: SaflProductBannerData[]
}

export interface SaflProductRangeData {
  badge: string
  badgeIcon: string
  watermarkText: string
  ctaLabel: string
  ctaHref?: string
  categories: SaflProductCategoryData[]
}

export interface SaflStatCardData {
  number: string
  suffix: string
  description: string
  vector: string
}

export interface SaflStatsData {
  badge: string
  badgeIcon: string
  description: string
  stats: SaflStatCardData[]
}

export interface SaflProcessStepData {
  title: string
  description: string
  image: string
}

export interface SaflProcessData {
  badge: string
  badgeIcon: string
  steps: SaflProcessStepData[]
}

export interface SaflData {
  hero: SaflHeroData
  about: SaflAboutData
  productRange: SaflProductRangeData
  stats: SaflStatsData
  process: SaflProcessData
}

/* --- Hospitality --------------------------------------------------- */
export interface HospitalityHeroSlideData {
  image: string
  title: string
  subtitle: string
}

export interface HospitalityAboutData {
  badge: string
  badgeIcon: string
  watermarkText: string
  decorativeImage: string
  paragraphs: string[]
}

export interface HospitalityCountryData {
  name: string
  image: string
  resorts: HospitalityResortData[]
  restaurants: HospitalityRestaurantData[]
}

export interface HospitalityResortData {
  name: string
  location: string
  description: string
  image: string
  url: string
}

export interface HospitalityGlobalPresenceData {
  badge: string
  badgeIcon: string
  ctaLabel: string
  ctaHref?: string
  countries: HospitalityCountryData[]
}

export interface HospitalityRestaurantData {
  name: string
  location: string
  description: string
  image: string
}

export interface HospitalityRestaurantsData {
  badge: string
  badgeIcon: string
  restaurants: HospitalityRestaurantData[]
}

export interface HospitalityImpactStatData {
  number: string
  label: string
  description: string
  vector: string
}

export interface HospitalityImpactData {
  badge: string
  badgeIcon: string
  description: string
  stats: HospitalityImpactStatData[]
}

export interface HospitalityInquiryData {
  image: string
  heading: string
  fullNamePlaceholder: string
  emailPlaceholder: string
  enquiryTypePlaceholder: string
  enquiryTypes: string[]
  messagePlaceholder: string
  ctaLabel: string
  ctaHref?: string
}

export interface HospitalityData {
  hero: { slides: HospitalityHeroSlideData[] }
  about: HospitalityAboutData
  globalPresence: HospitalityGlobalPresenceData
  impact: HospitalityImpactData
  inquiry: HospitalityInquiryData
}

/* --- Entertainment ------------------------------------------------- */
export interface EntertainmentHeroData {
  heading: string
  description: string
  mobileVideoUrl: string
  desktopVideoUrl: string
}

export interface EntertainmentAboutData {
  badge: string
  badgeIcon: string
  watermarkText: string
  paragraphs: string[]
}

export interface EntertainmentRideData {
  name: string
  description: string
  image: string
  video?: string
}

export interface EntertainmentRideCategoryData {
  name: string
  rides: EntertainmentRideData[]
}

export interface EntertainmentRidesData {
  badge: string
  badgeIcon: string
  watermarkText: string
  ctaLabel: string
  ctaHref?: string
  categories: EntertainmentRideCategoryData[]
}

export interface EntertainmentEventData {
  image: string
  date: string
  title: string
  description: string
}

export interface EntertainmentEventsData {
  badge: string
  badgeIcon: string
  ctaLabel: string
  ctaHref?: string
  events: EntertainmentEventData[]
}

export interface EntertainmentRestaurantData {
  name: string
  location: string
  description: string
  image: string
}

export interface EntertainmentRestaurantsData {
  badge: string
  badgeIcon: string
  restaurants: EntertainmentRestaurantData[]
}

export interface EntertainmentStatData {
  number: string
  suffix: string
  description: string
  vector: string
}

export interface EntertainmentStatsData {
  badge: string
  badgeIcon: string
  description: string
  stats: EntertainmentStatData[]
}

export interface EntertainmentData {
  hero: EntertainmentHeroData
  about: EntertainmentAboutData
  rides: EntertainmentRidesData
  events: EntertainmentEventsData
  restaurants: EntertainmentRestaurantsData
  stats: EntertainmentStatsData
  bookRideButtonText: string
  bookRideButtonLink?: string
}

/* --- Logistics ----------------------------------------------------- */
export interface LogisticsHeroData {
  mobileImage: string
  desktopImage: string
  heading: string
}

export interface LogisticsStatCardData {
  icon: string
  title: string
  description: string
}

export interface LogisticsStatsData {
  cards: LogisticsStatCardData[]
}

export interface LogisticsAboutData {
  badge: string
  badgeIcon: string
  mobileWatermarkText: string
  desktopWatermarkText: string
  decorativeImage: string
  paragraphs: string[]
}

export interface LogisticsDivisionStatData {
  value: string
  label: string
}

export interface LogisticsCompanyDetailsData {
  badge: string
  badgeIcon: string
  description: string
  watermarkText: string
  mapImage: string
  companyInfoLabel: string
  companyPoints: string[]
  divisionOverviewLabel: string
  divisionOverview: LogisticsDivisionStatData[]
}

export interface LogisticsData {
  hero: LogisticsHeroData
  stats: LogisticsStatsData
  about: LogisticsAboutData
  companyDetails: LogisticsCompanyDetailsData
}

/* --- Wedding Collective -------------------------------------------- */
export interface WeddingHeroData {
  videoUrl: string
  heading: string
}

export interface WeddingGalleryData {
  badgeIcon: string
  badgeDesktopText: string
  badgeMobileText: string
  description: string
  images: string[]
}

export interface WeddingInquiryData {
  image: string
  heading: string
  fullNamePlaceholder: string
  mobilePlaceholder: string
  emailPlaceholder: string
  eventTypePlaceholder: string
  eventTypes: string[]
  eventBudgetPlaceholder: string
  eventBudgets: string[]
  eventDatePlaceholder: string
  eventTimePlaceholder: string
  requirementsPlaceholder: string
  ctaLabel: string
  ctaHref?: string
}

export interface WeddingCollectiveData {
  hero: WeddingHeroData
  gallery: WeddingGalleryData
  inquiry: WeddingInquiryData
}

/* --- Vital Industries ---------------------------------------------- */
export interface VitalHeroData {
  mobileImage: string
  desktopImage: string
  heading: string
}

export interface VitalStatCardData {
  icon: string
  title: string
  description: string
}

export interface VitalStatsData {
  cards: VitalStatCardData[]
}

export interface VitalAboutData {
  badge: string
  badgeIcon: string
  mobileWatermarkText: string
  desktopWatermarkText: string
  decorativeImage: string
  paragraphs: string[]
}

export interface VitalPackagingStatData {
  value: string
  label: string
}

export interface VitalPackagingData {
  badge: string
  badgeIcon: string
  description: string
  companyInfoLabel: string
  stats: VitalPackagingStatData[]
  bullets: string[]
}

export interface VitalProductData {
  name: string
  image: string
}

export interface VitalTransportData {
  badge: string
  badgeIcon: string
  description: string
  enaTransportationLabel: string
  productsLabel: string
  enaBullets: string[]
  products: VitalProductData[]
}

export interface VitalMilestoneTabData {
  tabName: string
  image: string
  bullets: string[]
}

export interface VitalMilestoneData {
  badge: string
  badgeIcon: string
  watermarkText: string
  tabs: VitalMilestoneTabData[]
}

export interface VitalIndustriesData {
  hero: VitalHeroData
  stats: VitalStatsData
  about: VitalAboutData
  packaging: VitalPackagingData
  transport: VitalTransportData
  milestone: VitalMilestoneData
}

/* --- Contact ------------------------------------------------------- */
export interface ContactHeroData {
  heading: string
  description: string
  mobileImage: string
  desktopImage: string
}

export interface ContactInfoItemData {
  icon: string
  label: string
  value: string
  href: string
}

export interface GetInTouchData {
  watermarkText: string
  description: string
  items: ContactInfoItemData[]
}

export interface ContactFormData {
  heading: string
  mobileDescription: string
  bgVector: string
  overlayVector: string
  fullNamePlaceholder: string
  emailPlaceholder: string
  subjectPlaceholder: string
  messagePlaceholder: string
  ctaLabel: string
  ctaHref?: string
}

export interface DepartmentCardData {
  title: string
  description: string
  email: string
}

export interface DepartmentsData {
  cards: DepartmentCardData[]
}

export interface ContactData {
  hero: ContactHeroData
  getInTouch: GetInTouchData
  contactForm: ContactFormData
  departments: DepartmentsData
}

/* --- Careers ------------------------------------------------------- */
export interface CareersHeroData {
  heading: string
  description: string
  mobileImage: string
  desktopImage: string
}

export interface CareersWhyWorkCardData {
  icon: string
  title: string
  description: string
}

export interface CareersWhyWorkUsData {
  badge: string
  badgeIcon: string
  cards: CareersWhyWorkCardData[]
}

export interface CareersValueData {
  number: string
  title: string
  description: string
  icon: string
}

export interface CareersStrongValuesData {
  badge: string
  badgeIcon: string
  description: string
  values: CareersValueData[]
}

export interface CareersDemographicStatData {
  icon: string
  value: string
  label: string
}

export interface CareersDemographicsData {
  badge: string
  badgeIcon: string
  description: string
  teamImage: string
  stats: CareersDemographicStatData[]
}

export interface CareersProcessStepData {
  number: string
  title: string
  description: string
}

export interface CareersApplicationProcessData {
  badge: string
  badgeIcon: string
  steps: CareersProcessStepData[]
}

export interface CareersExploreJobsData {
  heading: string
  ctaLabel: string
  ctaHref: string
}

export interface CareersData {
  hero: CareersHeroData
  whyWorkUs: CareersWhyWorkUsData
  strongValues: CareersStrongValuesData
  demographics: CareersDemographicsData
  applicationProcess: CareersApplicationProcessData
  exploreJobs: CareersExploreJobsData
}

/* --- Newsletter Page ---------------------------------------------- */
export interface NewsletterPageHeroData {
  heading: string
  description: string
  mobileImage: string
  desktopImage: string
}

export interface NewsletterPageItemData {
  month: string
  title: string
  pdfUrl: string
  thumbnail: string
}

export interface NewsletterYearData {
  year: string
  items: NewsletterPageItemData[]
}

export interface NewsletterArchiveData {
  badge: string
  badgeIcon: string
  selectYearLabel: string
  watermarkText: string
  viewMoreLabel: string
  years: NewsletterYearData[]
}

export interface NewsletterSubscribeData {
  heading: string
  description: string
  emailPlaceholder: string
  ctaLabel: string
  ctaHref?: string
}

export interface NewsletterPageData {
  hero: NewsletterPageHeroData
  archive: NewsletterArchiveData
  subscribe: NewsletterSubscribeData
}

/* --- About Us Page ------------------------------------------------- */
export interface AboutFounderSlideData {
  badge: string
  badgeIcon: string
  bio: string[]
  watermark: string
  image: string
  quote: string
  quoteAttribution: string
}

export interface AboutFounderData {
  slides: AboutFounderSlideData[]
}

export interface AboutVisionaryBeginningsData {
  heading: string
  description: string
  bannerImage: string
  mobileBannerImage?: string
}

export interface AboutCompanyData {
  badge: string
  badgeIcon: string
  description: string
  image: string
}

export interface AboutGoldenRuleData {
  num: string
  title: string
  description: string
  icon: string
}

export interface AboutGoldenRulesData {
  badge: string
  badgeIcon: string
  description: string
  cards: AboutGoldenRuleData[]
}

export interface AboutTimelineSlideData {
  image: string
  body: string
}

export interface AboutTimelineYearData {
  year: string
  slides: AboutTimelineSlideData[]
}

export interface AboutTimelineData {
  badge: string
  badgeIcon: string
  backgroundImage: string
  years: AboutTimelineYearData[]
}

export interface AboutGalleryImageData {
  src: string
  aspect: string
}

export interface AboutGalleryData {
  badge: string
  badgeIcon: string
  description: string
  images: AboutGalleryImageData[]
}

export interface AboutPastVentureData {
  name: string
  description: string
  image: string
  logo: string
}

export interface AboutPastVenturesData {
  badge: string
  badgeIcon: string
  description: string
  ventures: AboutPastVentureData[]
}

export interface AboutCharitableTrustData {
  badge: string
  badgeIcon: string
  description: string
  watermarkText: string
  aidIntroText: string
  aidBulletIcon: string
  aidItems: string[]
  slides: string[]
}

export interface AboutPhilanthropicActivityData {
  title: string
  highlight: string
  description: string
  image: string
}

export interface AboutPhilanthropicData {
  badge: string
  badgeIcon: string
  description: string
  activities: AboutPhilanthropicActivityData[]
}

export interface AboutTestimonialData {
  quote: string
  name: string
  role: string
  avatar: string
  rating: number
}

export interface AboutTestimonialsData {
  badge: string
  badgeIcon: string
  description: string
  mobileDescription: string
  testimonials: AboutTestimonialData[]
}

export interface AboutData {
  founder: AboutFounderData
  visionaryBeginnings: AboutVisionaryBeginningsData
  aboutCompany: AboutCompanyData
  goldenRules: AboutGoldenRulesData
  timeline: AboutTimelineData
  gallery: AboutGalleryData
  pastVentures: AboutPastVenturesData
  charitableTrust: AboutCharitableTrustData
  philanthropic: AboutPhilanthropicData
  testimonials: AboutTestimonialsData
}

/* --- Aggregated homepage payload ---------------------------------- */
export interface HomepageData {
  hero: HeroData
  leadership: LeadershipData
  vision: VisionData
  legacy: LegacyData
  businessPortfolio: BusinessPortfolioData
  partners: PartnersData
  glance: GlanceData
  testimonials: TestimonialsData
  sustainability: SustainabilityData
  awards: AwardsData
  eventEnquiry: EventEnquiryData
  pressRelease: PressReleaseSectionData
  philanthropic: PhilanthropicData
  galleryNewsletter: GalleryNewsletterData
  partnerCta: PartnerCtaData
}

/* --- Site Header (single type) ------------------------------------ */
export interface NavLinkData {
  label: string
  url: string
  isBold?: boolean
  hasDropdown?: boolean
}

export interface HeaderData {
  logo: string
  navLinks?: NavLinkData[]
  companyLinks?: NavLinkData[]
  mobileMenuLinks?: NavLinkData[]
}

/* --- Site Footer (single type) ------------------------------------ */
export interface FooterSocialLinkData {
  icon: string
  url: string
}

export interface FooterContactItemData {
  icon: string
  value: string
  href: string
}

export type SeoData = Record<string, unknown>

export type RichTextChild = {
  text?: string
  bold?: boolean
}

export type RichTextBlock = {
  type?: string
  level?: number
  children?: RichTextChild[]
}

export interface FooterData {
  logo: string
  description: string
  copyright: string
  socialLinks: FooterSocialLinkData[]
  contactItems: FooterContactItemData[]
}


