// app/(lib)/services/workshopDetailService.ts
import { cache } from "react";
import { apiClient } from "../../app/api/client";
import { handleAPIError } from "../utils/apiErrorHandler";
import { withCDN } from "@/src/lib/utils";
import { getLanguageCode } from "../utils/getLanguageCode";

export interface WorkshopObjective {
  icon: string;
  title: string;
  description: string;
}

export interface WorkshopDiscovery {
  icon: string;
  text: string;
}

export interface WorkshopHighlight {
  title: string;
  description: string;
}

export interface GallerySlide {
  img: string;
  title: string;
}

export interface WorkshopDetailData {
  id: string;
  cwProgramId?: number | string | null;
  slug: string;
  title: string;
  subtitle: string;
  description: string;
  // SEO meta (from the backend activity translation) — used by generateMetadata.
  seoTitle?: string;
  seoDescription?: string;
  ageRange: string;
  ageLabel: string;
  duration: string;
  durationDays: string;
  durationHeading: string;
  durationUnit: string;
  createdFor: string;
  tag: string;
  borderColor: string;
  iconSrc: string;
  imageSrc: string;
  ribbonImage: string;
  mobileRibbonImage: string;
  categoryTag: string;
  objectives: WorkshopObjective[];
  whatKidsDiscover: WorkshopDiscovery[];
  workshopHighlights: WorkshopHighlight[];
  ctaText: string;
  actionText: string;
  seeInActionTitle: string;
  seeInActionDescription: string;
  // New fields for complete page
  objectivesHeading: string;
  seeInActionHeadingColoredPart: string;
  seeInActionHeading: string;
  whatKidsDiscoverHeading: string;
  workshopHighlightsHeading: string;
  highlightsImageSrc: string;
  galleryImageSrc: string;
  // Slider images
  autoScrollSliderImages: string[];
  reverseAutoScrollSliderImages: string[];
  animatedScrollItems: string[];
  // Gallery slider
  gallerySlides: GallerySlide[];
  // Hero banner backgrounds
  heroBgMobile: string;
  heroBgDesktop: string;
  // Objectives section backgrounds
  objectivesBgMobile: string;
  objectivesBgDesktop: string;
  // Discoveries section backgrounds
  discoveriesBgMobile: string;
  discoveriesBgDesktop: string;
  // Highlights section backgrounds
  highlightsBgMobile: string;
  highlightsBgDesktop: string;
  // Images for accordion/highlights sections
  highlightsMobileImageSrc: string;
  highlightsDesktopImageSrc: string;
  // Footer slider items (per-workshop, from admin)
  bottomSliders?: Array<{ tag: string; title: string; robot_image?: string }>;
  // Optional override for the "What Kids Discover" text color (heading + bullets)
  discoverTextColor?: string;

   // AI- Feature section
  featureSection?: {
    heading?: string;
    AiSubtitle: string;
    AiDescription: string;
    AiImage: string;
    AiButtonText?: string;
    AiButtonLink?: string;
    reverse?: boolean;
    AiGradientStart?: string;
    AiGradientEnd?: string;
  };
}

// ============ NEW TYPE FOR TRANSLATIONS ============
export interface WorkshopDetailDataWithTranslations {
  default: WorkshopDetailData;
  translated?: WorkshopDetailData;
}

// ============================================================================
// WORKSHOP-SPECIFIC CONTENT - Different objectives, discoveries, highlights per workshop
// (Uses same images/text for now - will be customized one by one later)
// ============================================================================

// CAMPS - Objectives
const CAMPS_OBJECTIVES: WorkshopObjective[] = [
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/Program-detail/Creative-thinking.png",
    title: "Inspire Curiosity",
    description:
      "Inspire curiosity and a love for science through hands-on engineering challenges.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/Program-detail/Teamwork.png",
    title: "Teamwork & Creativity",
    description:
      "Encourage teamwork, problem-solving, and creative thinking in a playful environment.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/Program-detail/setting_circle_icon.png",
    title: "Applied Learning",
    description:
      "Help children apply theoretical STEM concepts in real-life model building.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/orange_circle_icon.png",
    title: "Confidence Building",
    description:
      "Promote independent thinking, experimentation, and confidence.",
  },
];

const CAMPS_DISCOVERIES: WorkshopDiscovery[] = [
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/programs-page/AllPrograms/Vector.svg",
    text: "The physics behind gears, pulleys, and energy transfer through real model creation.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/programs-page/AllPrograms/Vector.svg",
    text: "How teamwork and design thinking can turn an idea into a working invention.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/programs-page/AllPrograms/Vector.svg",
    text: "The thrill of problem-solving and iteration — learning by experimenting.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/programs-page/AllPrograms/Vector.svg",
    text: "A deeper appreciation for science, engineering, and innovation.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/programs-page/AllPrograms/Vector.svg",
    text: "The perfect balance between play, learning, and celebration.",
  },
];

const CAMPS_HIGHLIGHTS: WorkshopHighlight[] = [
  {
    title: "What age group is this workshop for?",
    description:
      "Our workshops are designed for children aged 6-12. We offer activities tailored to different skill levels, ensuring every child enjoys and learns.",
  },
  {
    title: "How long is each workshop session?",
    description:
      "Each workshop runs for a full day as part of our 5-day camp program. Sessions are designed to keep children engaged with structured learning and outdoor activities.",
  },
  {
    title: "What will my child build?",
    description:
      "Children will work on real engineering projects involving physics, gears, pulleys, and energy transfer. They'll create working models and inventions while learning fundamental STEM concepts.",
  },
  {
    title: "Do children work in teams?",
    description:
      "Yes! Teamwork is a core part of our program. Children collaborate on projects, develop communication skills, and learn the value of working together to solve problems.",
  },
  {
    title: "What materials are provided?",
    description:
      "We provide all necessary building materials and tools. Children bring creativity and enthusiasm—everything else is covered by our comprehensive camp program.",
  },
];

// BIRTHDAY - Objectives
const BIRTHDAY_OBJECTIVES: WorkshopObjective[] = [
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/birthday-party/orange_circle_icon%20(1).png",
    title: "Inspire Curiosity",
    description:
      "Inspire curiosity and a love for science through hands-on engineering challenges.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/birthday-party/orange_circle_icon%20(2).png",
    title: "Teamwork & Creativity",
    description:
      "Encourage teamwork, problem-solving, and creative thinking in a playful environment.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/birthday-party/orange_circle_icon%20(3).png",
    title: "Applied Learning",
    description:
      "Help children apply theoretical STEM concepts in real-life model building.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/birthday-party/orange_circle_icon%402x.png",
    title: "Confidence Building",
    description:
      "Promote independent thinking, experimentation, and confidence.",
  },
];

const BIRTHDAY_DISCOVERIES: WorkshopDiscovery[] = [
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/programs-page/AllPrograms/Vector.svg",
    text: "The physics behind gears, pulleys, and energy transfer through real model creation.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/programs-page/AllPrograms/Vector.svg",
    text: "How teamwork and design thinking can turn an idea into a working invention.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/programs-page/AllPrograms/Vector.svg",
    text: "The thrill of problem-solving and iteration — learning by experimenting.",
  },
  {
    icon: withCDN("/programs-page/AllPrograms/Vector.svg"),
    text: "The confidence that comes from seeing their imagination take shape.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/programs-page/AllPrograms/Vector.svg",
    text: "The perfect balance between play, learning, and celebration.",
  },
];

const BIRTHDAY_HIGHLIGHTS: WorkshopHighlight[] = [
  {
    title: "What age group is this workshop for?",
    description:
      "Our workshops are designed for children aged 6-12. We offer activities tailored to different skill levels, ensuring every child enjoys and learns.",
  },
  {
    title: "How long is each workshop session?",
    description:
      "Each workshop runs for a full day as part of our 5-day camp program. Sessions are designed to keep children engaged with structured learning and outdoor activities.",
  },
  {
    title: "What will my child build?",
    description:
      "Children will work on real engineering projects involving physics, gears, pulleys, and energy transfer. They'll create working models and inventions while learning fundamental STEM concepts.",
  },
  {
    title: "Do children work in teams?",
    description:
      "Yes! Teamwork is a core part of our program. Children collaborate on projects, develop communication skills, and learn the value of working together to solve problems.",
  },
  {
    title: "What materials are provided?",
    description:
      "We provide all necessary building materials and tools. Children bring creativity and enthusiasm—everything else is covered by our comprehensive camp program.",
  },
];

// BUILD UP - Objectives
const BUILD_OBJECTIVES: WorkshopObjective[] = [
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/BuildUp/orange_circle_icon%20(1).png",
    title: "test Curiosity",
    description:
      "test and a love for science through hands-on engineering challenges.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/BuildUp/orange_circle_icon%20(2).png",
    title: "Teamwork & Creativity",
    description:
      "Encourage teamwork, problem-solving, and creative thinking in a playful environment.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/BuildUp/orange_circle_icon%20(3).png",
    title: "Applied Learning",
    description:
      "Help children apply theoretical STEM concepts in real-life model building.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/BuildUp/Subtract.png",
    title: "Confidence Building",
    description:
      "Promote independent thinking, experimentation, and confidence.",
  },
];

const BUILD_DISCOVERIES: WorkshopDiscovery[] = [
  {
    icon: withCDN("/programs-page/AllPrograms/Vector.svg"),
    text: "How using different senses (touch, sight, hearing) helps explore engineering and problem solving.",
  },
  {
    icon: withCDN("/programs-page/AllPrograms/Vector.svg"),
    text: "Practical skills in planning, sequencing, and executing model building tasks.",
  },
  {
    icon: withCDN("/programs-page/AllPrograms/Vector.svg"),
    text: "Enhanced social interaction: working in small groups, sharing materials, listening and responding.",
  },
  {
    icon: withCDN("/programs-page/AllPrograms/Vector.svg"),
    text: "The joy of creativity and innovation, and that mistakes or variation can help learning.",
  },
];

const BUILD_HIGHLIGHTS: WorkshopHighlight[] = [
  {
    title: "What age group is this workshop for?",
    description:
      "Our workshops are designed for children aged 6-12. We offer activities tailored to different skill levels, ensuring every child enjoys and learns.",
  },
  {
    title: "How long is each workshop session?",
    description:
      "Each workshop runs for a full day as part of our 5-day camp program. Sessions are designed to keep children engaged with structured learning and outdoor activities.",
  },
  {
    title: "What will my child build?",
    description:
      "Children will work on real engineering projects involving physics, gears, pulleys, and energy transfer. They'll create working models and inventions while learning fundamental STEM concepts.",
  },
  {
    title: "Do children work in teams?",
    description:
      "Yes! Teamwork is a core part of our program. Children collaborate on projects, develop communication skills, and learn the value of working together to solve problems.",
  },
  {
    title: "What materials are provided?",
    description:
      "We provide all necessary building materials and tools. Children bring creativity and enthusiasm—everything else is covered by our comprehensive camp program.",
  },
];

// PRO - Objectives
const PRO_OBJECTIVES: WorkshopObjective[] = [
  {
    icon: withCDN("/discover/pro/orange_circle_icon%20(1).png"),
    title: "Inspire Curiosity",
    description:
      "Inspire curiosity and a love for science through hands-on engineering challenges.",
  },
  {
    icon: withCDN("/discover/pro/orange_circle_icon%20(2).png"),
    title: "Teamwork & Creativity",
    description:
      "Encourage teamwork, problem-solving, and creative thinking in a playful environment.",
  },
  {
    icon: withCDN("/discover/pro/orange_circle_icon%20(3).png"),
    title: "Applied Learning",
    description:
      "Help children apply theoretical STEM concepts in real-life model building.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/pro/orange_circle_icon%20(5).png",
    title: "Confidence Building",
    description:
      "Promote independent thinking, experimentation, and confidence.",
  },
];

const PRO_DISCOVERIES: WorkshopDiscovery[] = [
  {
    icon: withCDN("/programs-page/AllPrograms/Vector.svg"),
    text: "How collaboration and diverse perspectives lead to better solutions.",
  },
  {
    icon: withCDN("/programs-page/AllPrograms/Vector.svg"),
    text: "The importance of iteration: test, fail, adjust, and improve.",
  },
  {
    icon: withCDN("/programs-page/AllPrograms/Vector.svg"),
    text: "Leadership and role flexibility — who leads when, who supports, and how to shift roles.",
  },
  {
    icon: withCDN("/programs-page/AllPrograms/Vector.svg"),
    text: "That fun, hands-on challenges can inspire fresh thinking applicable back at work.",
  },
];

const PRO_HIGHLIGHTS: WorkshopHighlight[] = [
  {
    title: "What age group is this workshop for?",
    description:
      "Our workshops are designed for children aged 6-12. We offer activities tailored to different skill levels, ensuring every child enjoys and learns.",
  },
  {
    title: "How long is each workshop session?",
    description:
      "Each workshop runs for a full day as part of our 5-day camp program. Sessions are designed to keep children engaged with structured learning and outdoor activities.",
  },
  {
    title: "What will my child build?",
    description:
      "Children will work on real engineering projects involving physics, gears, pulleys, and energy transfer. They'll create working models and inventions while learning fundamental STEM concepts.",
  },
  {
    title: "Do children work in teams?",
    description:
      "Yes! Teamwork is a core part of our program. Children collaborate on projects, develop communication skills, and learn the value of working together to solve problems.",
  },
  {
    title: "What materials are provided?",
    description:
      "We provide all necessary building materials and tools. Children bring creativity and enthusiasm—everything else is covered by our comprehensive camp program.",
  },
];

// MECHANICS CAMPS - Objectives
const MECHANICS_OBJECTIVES: WorkshopObjective[] = [
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/mechanic-camp/orange_circle_icon%20(1).svg",
    title: "Inspire Curiosity",
    description:
      "Inspire curiosity and a love for science through hands-on engineering challenges.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/mechanic-camp/orange_circle_icon%20(2).svg",
    title: "Teamwork & Creativity",
    description:
      "Encourage teamwork, problem-solving, and creative thinking in a playful environment.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/mechanic-camp/orange_circle_icon.svg",
    title: "Applied Learning",
    description:
      "Help children apply theoretical STEM concepts in real-life model building.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/mechanic-camp/Subtract.svg",
    title: "Confidence Building",
    description:
      "Promote independent thinking, experimentation, and confidence.",
  },
];

const MECHANICS_DISCOVERIES: WorkshopDiscovery[] = [
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/programs-page/AllPrograms/Vector.svg",
    text: "The physics behind gears, pulleys, and energy transfer through real model creation.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/programs-page/AllPrograms/Vector.svg",
    text: "How teamwork and design thinking can turn an idea into a working invention.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/programs-page/AllPrograms/Vector.svg",
    text: "The thrill of problem-solving and iteration — learning by experimenting.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/programs-page/AllPrograms/Vector.svg",
    text: "A deeper appreciation for science, engineering, and innovation.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/programs-page/AllPrograms/Vector.svg",
    text: "The perfect balance between play, learning, and celebration.",
  },
];

const MECHANICS_HIGHLIGHTS: WorkshopHighlight[] = [
  {
    title: "What age group is this workshop for?",
    description:
      "Our workshops are designed for children aged 6-12. We offer activities tailored to different skill levels, ensuring every child enjoys and learns.",
  },
  {
    title: "How long is each workshop session?",
    description:
      "Each workshop runs for a full day as part of our 5-day camp program. Sessions are designed to keep children engaged with structured learning and outdoor activities.",
  },
  {
    title: "What will my child build?",
    description:
      "Children will work on real engineering projects involving physics, gears, pulleys, and energy transfer. They'll create working models and inventions while learning fundamental STEM concepts.",
  },
  {
    title: "Do children work in teams?",
    description:
      "Yes! Teamwork is a core part of our program. Children collaborate on projects, develop communication skills, and learn the value of working together to solve problems.",
  },
  {
    title: "What materials are provided?",
    description:
      "We provide all necessary building materials and tools. Children bring creativity and enthusiasm—everything else is covered by our comprehensive camp program.",
  },
];

// CODING CAMPS - Objectives
const CODING_OBJECTIVES: WorkshopObjective[] = [
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/orange_circle_icon%20(1).svg",
    title: "Logical Thinking",
    description:
      "Develop logical reasoning and step-by-step problem solving through fun coding challenges.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/orange_circle_icon%20(2).svg",
    title: "Creative Coding",
    description:
      "Spark creativity by turning ideas into interactive games, stories, and animations.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/orange_circle_icon.svg",
    title: "Real-World Skills",
    description:
      "Introduce real programming concepts that prepare kids for a digital-first future.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/Subtract.svg",
    title: "Confident Makers",
    description:
      "Build confidence through experimentation, debugging, and finishing what you start.",
  },
];

const CODING_DISCOVERIES: WorkshopDiscovery[] = [
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/Vector%20(2).png",
    text: "How code can move characters, draw worlds, and bring ideas to life.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/Vector%20(2).png",
    text: "The thinking patterns behind algorithms, loops, and conditions.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/Vector%20(2).png",
    text: "How small bugs lead to big lessons — debugging as a creative skill.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/Vector%20(2).png",
    text: "The joy of seeing their own program run for the very first time.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/Vector%20(2).png",
    text: "That technology is something to build with, not just consume.",
  },
];

const CODING_HIGHLIGHTS: WorkshopHighlight[] = [
  {
    title: "What age group is this workshop for?",
    description:
      "Our coding camps are designed for children aged 7-14, with content adapted across age groups so every camper is challenged at the right level.",
  },
  {
    title: "Do kids need prior coding experience?",
    description:
      "No prior experience is required. Beginners start with block-based coding, while returning campers progress to text-based languages.",
  },
  {
    title: "What will my child build during camp?",
    description:
      "Campers build interactive games, simple animations, and small projects they can share with friends and family at the end of the week.",
  },
  {
    title: "How is the day structured?",
    description:
      "Full-day sessions balance focused coding time, hands-on activities, breaks, and team challenges to keep kids engaged and energized.",
  },
  {
    title: "What equipment is provided?",
    description:
      "All laptops, software, and learning materials are provided. Kids only need to bring their curiosity and a packed lunch.",
  },
];

// GOLDEN AGE - Objectives
const GOLDEN_OBJECTIVES: WorkshopObjective[] = [
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/Golder-age/orange_circle_icon%20(1).png",
    title: "Inspire Curiosity",
    description:
      "Inspire curiosity and a love for science through hands-on engineering challenges.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/Golder-age/Subtract%20(1).png",
    title: "Teamwork & Creativity",
    description:
      "Encourage teamwork, problem-solving, and creative thinking in a playful environment.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/Golder-age/Subtract%20(2).png",
    title: "Applied Learning",
    description:
      "Help children apply theoretical STEM concepts in real-life model building.",
  },
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/discover/Golder-age/Subtract.png",
    title: "Confidence Building",
    description:
      "Promote independent thinking, experimentation, and confidence.",
  },
];

const GOLDEN_DISCOVERIES: WorkshopDiscovery[] = [
  {
    icon: "https://yefranchisees.b-cdn.net/frontend/programs-page/AllPrograms/Vector.svg",
    text: "The physics behind gears, pulleys, and energy transfer through real model creation.",
  },
  {
    icon: withCDN("/programs-page/AllPrograms/Vector.svg"),
    text: "The joy of creating something from scratch — and the pride that follows.",
  },
  {
    icon: withCDN("/programs-page/AllPrograms/Vector.svg"),
    text: "The mental benefit of problem-solving, sequencing, and focused attention.",
  },
  {
    icon: withCDN("/programs-page/AllPrograms/Vector.svg"),
    text: "The value of connection — meeting peers, sharing ideas, collaborating, and reflecting together.",
  },

];

const GOLDEN_HIGHLIGHTS: WorkshopHighlight[] = [
  {
    title: "What age group is this workshop for?",
    description:
      "Our workshops are designed for children aged 6-12. We offer activities tailored to different skill levels, ensuring every child enjoys and learns.",
  },
  {
    title: "How long is each workshop session?",
    description:
      "Each workshop runs for a full day as part of our 5-day camp program. Sessions are designed to keep children engaged with structured learning and outdoor activities.",
  },
  {
    title: "What will my child build?",
    description:
      "Children will work on real engineering projects involving physics, gears, pulleys, and energy transfer. They'll create working models and inventions while learning fundamental STEM concepts.",
  },
  {
    title: "Do children work in teams?",
    description:
      "Yes! Teamwork is a core part of our program. Children collaborate on projects, develop communication skills, and learn the value of working together to solve problems.",
  },
  {
    title: "What materials are provided?",
    description:
      "We provide all necessary building materials and tools. Children bring creativity and enthusiasm—everything else is covered by our comprehensive camp program.",
  },
];

// ============================================================================
// WORKSHOP DATA - Static content for each workshop
// All use SHARED images, icons, and content for consistency
// Only 5 actual workshops that align with AllWorkshop.tsx
// ============================================================================
const WORKSHOPS_DATA: Record<string, WorkshopDetailData> = {
  camps: {
    id: "camps",
    slug: "camps",
    title: "Camps",
    subtitle: "Welcome to CREATIVE STEM CAMPS FOR YOUNG INNOVATORS",
    description:
      "where kids learn science and engineering by building moving models. Through real-world themes like physics, energy, and motion, they discover how things work — all while having fun outdoors.",
    ageRange: "1-5",
    ageLabel: "Age",
    duration: "Full-day",
    durationDays: "program over 5 days",
    durationHeading: "Duration",
    durationUnit: "min",
    createdFor: "Created for kids",
    tag: "CAMPS",
    borderColor: "#95C11F",
    iconSrc: withCDN("/workshop-logo/logo_camps.svg"),
    imageSrc: withCDN("/Workshop/photo%20(12).png"),
    ribbonImage: "https://yefranchisees.b-cdn.net/frontend/Program-detail/ribbon_dekstop.png",
    mobileRibbonImage: "https://yefranchisees.b-cdn.net/frontend/Workshop/bg%20%284%29.png",
    categoryTag: "CAMPS",
    objectivesHeading: "Workshop Objectives",
    seeInActionHeadingColoredPart: "Camps",
    seeInActionHeading: "THAT SPARK IMAGINATION",
    whatKidsDiscoverHeading: "What Kids Discover",
    workshopHighlightsHeading: "Workshop highlights",
    objectives: CAMPS_OBJECTIVES,
    whatKidsDiscover: CAMPS_DISCOVERIES,
    workshopHighlights: CAMPS_HIGHLIGHTS,
    ctaText: "BOOK WORKSHOP",
    actionText: "Book Workshop",
    seeInActionTitle: "Camps in Action",
    seeInActionDescription:
      "Experience the energy and excitement of our STEM camps where young innovators discover science through play, collaboration, and hands-on adventure.",
    // SHARED IMAGES FOR ALL WORKSHOPS
    autoScrollSliderImages: [
      "https://yefranchisees.b-cdn.net/frontend/discover/birthday-party/photo%20(5).png",
      "https://yefranchisees.b-cdn.net/frontend/discover/birthday-party/photo%20(6).png",
      "https://yefranchisees.b-cdn.net/frontend/discover/birthday-party/photo%20(7).png",
      "https://yefranchisees.b-cdn.net/frontend/discover/birthday-party/photo%20(4).png",
      "https://yefranchisees.b-cdn.net/frontend/discover/birthday-party/photo%20(8).png",
    ],
    reverseAutoScrollSliderImages: [
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_5.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_6.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_7.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_8.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_3.png",
    ],
    animatedScrollItems: [
      "NEW REALITY FOR YOUR CHILD",
      "GREAT OPPORTUNITIES",
      "TEAMWORK",
      "NEW REALITY FOR YOUR CHILD",
      "GREAT OPPORTUNITIES",
      "TEAMWORK",
    ],
    gallerySlides: [
      {
        img: "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_1.png",
        title: "Building Phase",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_2.png",
        title: "Testing & Learning",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_3.png",
        title: "Team Collaboration",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_4.png",
        title: "Success Celebration",
      },
    ],
    heroBgMobile:
      "https://yefranchisees.b-cdn.net/frontend/Program-detail/bg_mobile.png",
    heroBgDesktop:
      "https://yefranchisees.b-cdn.net/frontend/Program-detail/bg_hero-screen.jpg",
    objectivesBgMobile:
      "https://yefranchisees.b-cdn.net/frontend/Program-detail/bg_Program-Objectives.png",
    objectivesBgDesktop:
      "https://yefranchisees.b-cdn.net/frontend/discover/bg%20(14).png",
    discoveriesBgMobile:
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/bg_What%20Kids%20Discover%20(2).png",
    discoveriesBgDesktop:
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/bg_What%20Kids%20Discover%20(1)%20(1).png",
    highlightsBgMobile:
      "https://yefranchisees.b-cdn.net/frontend/Program-detail/bg_program%20highlights.png",
    highlightsBgDesktop:
      "https://yefranchisees.b-cdn.net/frontend/additional%20activities.png",
    highlightsMobileImageSrc:
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/pct%20(1)%20(1).png",
    highlightsDesktopImageSrc:
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/pct%20(1)%20(1).png",
    highlightsImageSrc:
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/pct%20(7).png",
    galleryImageSrc:
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/011%20Wind%20Powered%20Car%201%20(1).png",
  },

  birthday: {
    id: "birthday",
    slug: "birthday",
    title: "Birthday parties",
    subtitle: "MAKE YOUR SPECIAL DAY UNFORGETTABLE",
    description:
      "Celebrate with creativity and discovery! Our birthday workshops turn your party into a hands-on engineering adventure — where fun meets innovation, and every guest becomes a young creator.",
    ageRange: "6–10",
    ageLabel: "Age",
    duration: "120",
    durationDays: "",
    durationHeading: "Duration",
    durationUnit: "min",
    createdFor: "Created for kids",
    tag: "BIRTHDAY",
    borderColor: "#F49800",
    iconSrc: withCDN("/workshop-logo/logo_birthday.svg"),
    imageSrc: withCDN("/Workshop/photo%20(11).png"),
    ribbonImage: "https://yefranchisees.b-cdn.net/frontend/Program-detail/ribbon_dekstop.png",
    mobileRibbonImage: "https://yefranchisees.b-cdn.net/frontend/Workshop/bg%20%285%29.png",
    categoryTag: "BIRTHDAY",
    objectivesHeading: "Workshop Objectives",
    seeInActionHeadingColoredPart: "Birthdays",
    seeInActionHeading: "JUST GOT MORE EXCITING WITH YOUNG ENGINEERS!",
    whatKidsDiscoverHeading: "What Kids Discover",
    workshopHighlightsHeading: "Workshop highlights",
    objectives: BIRTHDAY_OBJECTIVES,
    whatKidsDiscover: BIRTHDAY_DISCOVERIES,
    workshopHighlights: BIRTHDAY_HIGHLIGHTS,
    ctaText: "BOOK WORKSHOP",
    actionText: "Book Workshop",
    seeInActionTitle: "Birthday parties in Action",
    seeInActionDescription:
      "Experience the energy and excitement of our birthday workshops where young innovators discover science through play, collaboration, and hands-on adventure.",
    autoScrollSliderImages: [
      "https://yefranchisees.b-cdn.net/frontend/discover/birthday-party/photo%20(5).png",
      "https://yefranchisees.b-cdn.net/frontend/discover/birthday-party/photo%20(6).png",
      "https://yefranchisees.b-cdn.net/frontend/discover/birthday-party/photo%20(7).png",
      "https://yefranchisees.b-cdn.net/frontend/discover/birthday-party/photo%20(8).png",
    ],
    reverseAutoScrollSliderImages: [
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_5.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_6.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_7.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_8.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_3.png",
    ],
    animatedScrollItems: [
      "NEW REALITY FOR YOUR CHILD",
      "GREAT OPPORTUNITIES",
      "TEAMWORK",
      "NEW REALITY FOR YOUR CHILD",
      "GREAT OPPORTUNITIES",
      "TEAMWORK",
    ],
    gallerySlides: [
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/birthday-party/pct%20(2).png",
        title: "Building Phase",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/birthday-party/pct%20(2).png",
        title: "Testing & Learning",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/birthday-party/pct%20(2).png",
        title: "Team Collaboration",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/birthday-party/pct%20(2).png",
        title: "Success Celebration",
      },
    ],
    heroBgMobile: withCDN("/Program-detail/Big-builders/bg_hero-mobile1.png"),
    heroBgDesktop: withCDN("/Program-detail/Big-builders/bg_hero-screen4.png"),
    objectivesBgMobile: withCDN("/Program-detail/bg_Program-Objectives.png"),
    objectivesBgDesktop: withCDN("https://yefranchisees.b-cdn.net/frontend/discover/bg%20(14).png"),
    discoveriesBgMobile: withCDN("/discover/birthday-party/bg_What%20Kids%20Discover%20(10).png"),
    discoveriesBgDesktop: withCDN("/discover/birthday-party/bg_What%20Kids%20Discover2x.png"),
    highlightsBgMobile: withCDN("/Program-detail/bg_program%20highlights.png"),
    highlightsBgDesktop: withCDN("/additional%20activities.png"),
    highlightsMobileImageSrc: withCDN("/discover/birthday-party/pct%20(3).png"),
    highlightsDesktopImageSrc: withCDN("/discover/birthday-party/pct%20(3).png"),
    highlightsImageSrc: withCDN("/discover/birthday-party/pct%20(2).png"),
    galleryImageSrc: withCDN("/discover/birthday-party/instruction%20-tab%20(1).png"),
  },

  build: {
    id: "build",
    slug: "build",
    title: "Build UP",
    subtitle: "LEARNING THROUGH CREATIVITY AND CONNECTION",
    description:
      "A unique program designed for children with special needs that encourages personal growth through teamwork and mechanical exploration. Each session builds confidence, curiosity, and joy.",
    ageRange: "2-5",
    ageLabel: "Age",
    duration: "75",
    durationDays: "grades with diverse needs",
    durationHeading: "Duration",
    durationUnit: "min",
    createdFor: "Created for children",
    tag: "BUILD UP",
    borderColor: "#3A82C5",
    iconSrc: withCDN("/workshop-logo/logo_build_up.svg"),
    imageSrc: withCDN("/Workshop/photo%20(10).png"),
    ribbonImage: "https://yefranchisees.b-cdn.net/frontend/Program-detail/ribbon_dekstop.png",
    mobileRibbonImage: "https://yefranchisees.b-cdn.net/frontend/Workshop/bg%20%286%29.png",
    categoryTag: "BUILD UP",
    objectivesHeading: "Workshop Objectives",
    seeInActionHeadingColoredPart: "BuiLd Up",
    seeInActionHeading: "THAT INSPIRES CONFIDENCE",
    whatKidsDiscoverHeading: "What Kids Discover",
    workshopHighlightsHeading: "Workshop highlights",
    objectives: BUILD_OBJECTIVES,
    whatKidsDiscover: BUILD_DISCOVERIES,
    workshopHighlights: BUILD_HIGHLIGHTS,
    ctaText: "BOOK WORKSHOP",
    actionText: "Book Workshop",
    seeInActionTitle: "Build UP in Action",
    seeInActionDescription:
      "Experience the energy and excitement of our Build UP program where young innovators discover science through play, collaboration, and hands-on adventure.",
    // SHARED IMAGES FOR ALL WORKSHOPS
    autoScrollSliderImages: [

      "https://yefranchisees.b-cdn.net/frontend/discover/BuildUp/photo%20(4).png",
      "https://yefranchisees.b-cdn.net/frontend/discover/BuildUp/photo%20(5).png",
      "https://yefranchisees.b-cdn.net/frontend/discover/BuildUp/photo%20(6).png",
      "https://yefranchisees.b-cdn.net/frontend/discover/BuildUp/photo%20(7).png",
      "https://yefranchisees.b-cdn.net/frontend/discover/BuildUp/photo%20(8).png",
    ],
    reverseAutoScrollSliderImages: [
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_5.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_6.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_7.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_8.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_3.png",
    ],
    animatedScrollItems: [
      "NEW REALITY FOR YOUR CHILD",
      "GREAT OPPORTUNITIES",
      "TEAMWORK",
      "NEW REALITY FOR YOUR CHILD",
      "GREAT OPPORTUNITIES",
      "TEAMWORK",
    ],
    gallerySlides: [
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/BuildUp/pct%20(2).png",
        title: "Building Phase",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/BuildUp/pct%20(2).png",
        title: "Testing & Learning",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/BuildUp/pct%20(2).png",
        title: "Team Collaboration",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/BuildUp/pct%20(2).png",
        title: "Success Celebration",
      },
    ],
    heroBgMobile: withCDN("/discover/BuildUp/bg_hero-mobile1.png"),
    heroBgDesktop: withCDN("/discover/BuildUp/bg_hero-screen6.png"),
    objectivesBgMobile: withCDN("/Program-detail/bg_Program-Objectives.png"),
    objectivesBgDesktop: withCDN("https://yefranchisees.b-cdn.net/frontend/discover/bg%20(14).png"),
    discoveriesBgMobile: withCDN("/discover/BuildUp/bg_What%20Kids%20Discover%20(3).png"),
    discoveriesBgDesktop: withCDN("/discover/BuildUp/bg_What%20Kids%20Discover%20(4).png"),
    highlightsBgMobile: withCDN("/Program-detail/bg_program%20highlights.png"),
    highlightsBgDesktop: withCDN("/additional%20activities.png"),
    highlightsMobileImageSrc: withCDN("/discover/BuildUp/pct%20(3).png"),
    highlightsDesktopImageSrc: withCDN("/discover/BuildUp/pct%20(3).png"),
    highlightsImageSrc: withCDN("/discover/BuildUp/pct%20(2).png"),
    galleryImageSrc: withCDN("/discover/BuildUp/YE.415%20The%20Swinging%20Bricks%201%20(1).png"),
  },

  pro: {
    id: "pro",
    slug: "pro",
    title: "PRO",
    subtitle: "INNOVATION MEETS TEAMBUILDING",
    description:
      "A dynamic workshop for organizations and professionals, designed to strengthen collaboration and problem-solving through hands-on engineering challenges. Build, create, and grow together.",
    ageRange: "professionals, corporate teams & organizations",
    ageLabel: "Age",
    duration: "120",
    durationDays: "",
    durationHeading: "Duration",
    durationUnit: "min",
    createdFor: "Created for",
    tag: "PRO",
    borderColor: "#0B253C",
    iconSrc: withCDN("/workshop-logo/logo_pro.svg"),
    imageSrc: withCDN("/Workshop/photo%20(9).png"),
    ribbonImage: "https://yefranchisees.b-cdn.net/frontend/Program-detail/ribbon_dekstop.png",
    mobileRibbonImage: "https://yefranchisees.b-cdn.net/frontend/Workshop/bg%20%287%29.png",
    categoryTag: "PRO",
    objectivesHeading: "Workshop Objectives",
    seeInActionHeadingColoredPart: "PRO",
    seeInActionHeading: "TEAMS THAT BUILD SUCCESS",
    whatKidsDiscoverHeading: "What Kids Discover",
    workshopHighlightsHeading: "Workshop highlights",
    objectives: PRO_OBJECTIVES,
    whatKidsDiscover: PRO_DISCOVERIES,
    workshopHighlights: PRO_HIGHLIGHTS,
    ctaText: "BOOK WORKSHOP",
    actionText: "Book Workshop",
    seeInActionTitle: "PRO in Action",
    seeInActionDescription:
      "Experience the energy and excitement of our PRO program where professionals and teams discover innovation through play, collaboration, and hands-on adventure.",
    // SHARED IMAGES FOR ALL WORKSHOPS
    autoScrollSliderImages: [

      "https://yefranchisees.b-cdn.net/frontend/discover/pro/photo%20(4).png",
      "https://yefranchisees.b-cdn.net/frontend/discover/pro/photo%20(5).png",
      "https://yefranchisees.b-cdn.net/frontend/discover/pro/photo%20(6).png",
      "https://yefranchisees.b-cdn.net/frontend/discover/pro/photo%20(7).png",
    ],
    reverseAutoScrollSliderImages: [
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_5.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_6.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_7.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_8.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_3.png",
    ],
    animatedScrollItems: [
      "NEW REALITY FOR YOUR CHILD",
      "GREAT OPPORTUNITIES",
      "TEAMWORK",
      "NEW REALITY FOR YOUR CHILD",
      "GREAT OPPORTUNITIES",
      "TEAMWORK",
    ],
    gallerySlides: [
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/pro/pct%20(2).png",
        title: "Building Phase",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/pro/pct%20(2).png",
        title: "Testing & Learning",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/pro/pct%20(2).png",
        title: "Team Collaboration",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/pro/pct%20(2).png",
        title: "Success Celebration",
      },
    ],
    heroBgMobile: withCDN("/discover/pro/bg_hero-mobile1%20(2).png"),
    heroBgDesktop: withCDN("/discover/pro/bg_hero-screen6%20(3).png"),
    objectivesBgMobile: withCDN("/Program-detail/bg_Program-Objectives.png"),
    objectivesBgDesktop: withCDN("https://yefranchisees.b-cdn.net/frontend/discover/bg%20(14).png"),
    discoveriesBgMobile: withCDN("/discover/pro/bg_What%20Kids%20Discover%20(8).png"),
    discoveriesBgDesktop: withCDN("/discover/pro/bg_What%20Kids%20Discover%20(9).png"),
    highlightsBgMobile: withCDN("/Program-detail/bg_program%20highlights.png"),
    highlightsBgDesktop: withCDN("/additional%20activities.png"),
    highlightsMobileImageSrc: withCDN("/discover/pro/Construction%20Site%20Crane_edited3%201.png"),
    highlightsDesktopImageSrc: withCDN("/discover/pro/Construction%20Site%20Crane_edited3%201.png"),
    highlightsImageSrc: withCDN("/discover/pro/pct%20(2).png"),
    galleryImageSrc: withCDN("/discover/pro/Tree%20of%20Life%20(1).png"),
  },

  golden: {
    id: "golden",
    slug: "golden",
    title: "Golden age",
    subtitle: "Where CREATIVITY KNOWS NO AGE",
    description:
      "This inspiring workshop invites seniors to explore the joy of building, imagination, and motion. Through guided activities, participants enhance motor skills, memory, and social connection — while having fun.",
    ageRange: "55+",
    ageLabel: "Age",
    duration: "90",
    durationDays: "& intergenerational groups",
    durationHeading: "Duration",
    durationUnit: "min",
    createdFor: "Created for adults",
    tag: "GOLDEN AGE",
    borderColor: "#DDBD48",
    iconSrc: withCDN("/workshop-logo/logo_golden_age.svg"),
    imageSrc: withCDN("/Workshop/photo%20(8)%20(2).png"),
    ribbonImage: "https://yefranchisees.b-cdn.net/frontend/Program-detail/ribbon_dekstop.png",
    mobileRibbonImage: "https://yefranchisees.b-cdn.net/frontend/Workshop/bg%20%288%29%20%281%29.png",
    categoryTag: "GOLDEN AGE",
    objectivesHeading: "Workshop Objectives",
    seeInActionHeadingColoredPart: "Golden Age",
    seeInActionHeading: "- CREATIVITY THAT KNOWS NO AGE",
    whatKidsDiscoverHeading: "What Kids Discover",
    workshopHighlightsHeading: "Workshop highlights",
    objectives: GOLDEN_OBJECTIVES,
    whatKidsDiscover: GOLDEN_DISCOVERIES,
    workshopHighlights: GOLDEN_HIGHLIGHTS,
    ctaText: "BOOK WORKSHOP",
    actionText: "Book Workshop",
    seeInActionTitle: "Golden age in Action",
    seeInActionDescription:
      "Experience the energy and excitement of our Golden age program where seniors and intergenerational groups discover joy through play, collaboration, and hands-on adventure.",
    // SHARED IMAGES FOR ALL WORKSHOPS
    autoScrollSliderImages: [

      "https://yefranchisees.b-cdn.net/frontend/discover/Golder-age/photo%20(4).png",
      "https://yefranchisees.b-cdn.net/frontend/discover/Golder-age/photo%20(5).png",
      "https://yefranchisees.b-cdn.net/frontend/discover/Golder-age/photo%20(6).png",
      "https://yefranchisees.b-cdn.net/frontend/discover/Golder-age/photo%20(7).png",
    ],
    reverseAutoScrollSliderImages: [
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_5.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_6.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_7.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_8.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_3.png",
    ],
    animatedScrollItems: [
      "NEW REALITY FOR YOUR CHILD",
      "GREAT OPPORTUNITIES",
      "TEAMWORK",
      "NEW REALITY FOR YOUR CHILD",
      "GREAT OPPORTUNITIES",
      "TEAMWORK",
    ],
    gallerySlides: [
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/Golder-age/pct%20(2).png",
        title: "Building Phase",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/Golder-age/pct%20(2).png",
        title: "Testing & Learning",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/Golder-age/pct%20(2).png",
        title: "Team Collaboration",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/Golder-age/pct%20(2).png",
        title: "Success Celebration",
      },
    ],
    heroBgMobile: withCDN("/discover/Golder-age/bg_hero-mobile1%20(1).png"),
    heroBgDesktop: withCDN("/discover/Golder-age/bg_hero-screen6%20(2).png"),
    objectivesBgMobile: withCDN("/Program-detail/bg_Program-Objectives.png"),
    objectivesBgDesktop: withCDN("https://yefranchisees.b-cdn.net/frontend/discover/bg%20(14).png"),
    discoveriesBgMobile: withCDN("/discover/Golder-age/bg_What%20Kids%20Discover%20(7).png"),
    discoveriesBgDesktop: withCDN("/discover/Golder-age/bg_What%20Kids%20Discover%20(6).png"),
    highlightsBgMobile: withCDN("/Program-detail/bg_program%20highlights.png"),
    highlightsBgDesktop: withCDN("/additional%20activities.png"),
    highlightsMobileImageSrc: withCDN("/discover/Golder-age/pct%20(3).png"),
    highlightsDesktopImageSrc: withCDN("/discover/Golder-age/pct%20(3).png"),
    highlightsImageSrc: withCDN("/discover/Golder-age/pct%20(2).png"),
    galleryImageSrc: withCDN("/discover/Golder-age/What%20Kids%20Discover%20(1).png"),
  },

  mechanics: {
    id: "mechanics",
    slug: "mechanics",
    title: "Mechanics Camps",
    subtitle: "HANDS-ON MECHANICAL ADVENTURES FOR YOUNG INNOVATORS",
    description:
      "A high-energy STEM camp where kids build, test, and tinker with mechanical models. Through gears, motors, and motion-based challenges they discover how the world really works — outdoors and full of fun.",
    ageRange: "6-12",
    ageLabel: "age",
    duration: "Full-day",
    durationDays: "program over 5 days",
    durationHeading: "Duration",
    durationUnit: "program over 5 days",
    createdFor: "Created for children",
    tag: "MECHANICS",
    borderColor: "#226B20",
    iconSrc: withCDN("/workshop-logo/logo_camps.svg"),
    imageSrc:
      "https://yefranchisees.b-cdn.net/frontend/discover/mechanic-camp/camps_scroll_photo_3%20(1).png",
    ribbonImage:
      "https://yefranchisees.b-cdn.net/frontend/Program-detail/ribbon_dekstop.png",
    mobileRibbonImage: "https://yefranchisees.b-cdn.net/frontend/Workshop/bg%20%284%29.png",
    categoryTag: "MECHANICS",
    objectivesHeading: "Workshop Objectives",
    seeInActionHeadingColoredPart: "Mechanics Camps",
    seeInActionHeading: "THAT SPARK IMAGINATION",
    whatKidsDiscoverHeading: "What Kids Discover",
    workshopHighlightsHeading: "Workshop highlights",
    objectives: MECHANICS_OBJECTIVES,
    whatKidsDiscover: MECHANICS_DISCOVERIES,
    workshopHighlights: MECHANICS_HIGHLIGHTS,
    ctaText: "BOOK WORKSHOP",
    actionText: "Book Workshop",
    seeInActionTitle: "Mechanics Camps in Action",
    seeInActionDescription:
      "Experience the energy and excitement of our Mechanics Camps where young innovators discover engineering through play, collaboration, and hands-on adventure.",
    autoScrollSliderImages: [
      "https://yefranchisees.b-cdn.net/media/super_admin/1779110165803_12nshtw20wgm_photo.png",
      "https://yefranchisees.b-cdn.net/media/super_admin/1779110165804_iwcwna7jlx9_photo-1.png",
      "https://yefranchisees.b-cdn.net/media/super_admin/1779110165805_winya087iaq_photo-2.png",
      "hhttps://yefranchisees.b-cdn.net/media/super_admin/1779110167673_mjmkj325or8_photo-3.png",
      "https://yefranchisees.b-cdn.net/media/super_admin/1779110167674_qg7l2k4yh1_photo-4.png",
    ],
    reverseAutoScrollSliderImages: [
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_5.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_6.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_7.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_8.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_3.png",
    ],
    animatedScrollItems: [
      "NEW REALITY FOR YOUR CHILD",
      "GREAT OPPORTUNITIES",
      "TEAMWORK",
      "NEW REALITY FOR YOUR CHILD",
      "GREAT OPPORTUNITIES",
      "TEAMWORK",
    ],
    gallerySlides: [
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/mechanic-camp/002%20Ballon%20Race%201.png",
        title: "Building Phase",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/mechanic-camp/002%20Ballon%20Race%201.png",
        title: "Testing & Learning",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/mechanic-camp/002%20Ballon%20Race%201.png",
        title: "Team Collaboration",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/mechanic-camp/002%20Ballon%20Race%201.png",
        title: "Success Celebration",
      },
    ],
    heroBgMobile:
      "https://yefranchisees.b-cdn.net/frontend/discover/mechanic-camp/bg_hero-Mechanics-mobile1.png",
    heroBgDesktop:
      "https://yefranchisees.b-cdn.net/frontend/discover/mechanic-camp/bg_hero-screen4.png",
    objectivesBgMobile:
      "https://yefranchisees.b-cdn.net/frontend/Program-detail/bg_Program-Objectives.png",
    objectivesBgDesktop:
      "https://yefranchisees.b-cdn.net/frontend/discover/bg%20(14).png",
    discoveriesBgMobile:
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/bg_What%20Kids%20Discover%20(2).png",
    discoveriesBgDesktop:
      "https://yefranchisees.b-cdn.net/frontend/discover/mechanic-camp/bg_What%20Kids%20Discover%20(5)%20(1)%20(1).png",
    highlightsBgMobile:
      "https://yefranchisees.b-cdn.net/frontend/Program-detail/bg_program%20highlights.png",
    highlightsBgDesktop:
      "https://yefranchisees.b-cdn.net/frontend/additional%20activities.png",
    highlightsMobileImageSrc:
      "https://yefranchisees.b-cdn.net/frontend/discover/mechanic-camp/pct%20(12).png",
    highlightsDesktopImageSrc:
      "https://yefranchisees.b-cdn.net/frontend/discover/mechanic-camp/pct%20(12).png",
    highlightsImageSrc:
      "https://yefranchisees.b-cdn.net/frontend/discover/mechanic-camp/002%20Ballon%20Race%201.png",
    galleryImageSrc:
      "https://yefranchisees.b-cdn.net/frontend/discover/mechanic-camp/mechanics-camps.png",
  },

  coding: {
    id: "coding",
    slug: "coding",
    title: "Coding Camps",
    subtitle: "WHERE YOUNG MINDS LEARN TO BUILD WITH CODE",
    description:
      "A high-energy STEM camp where kids learn to think like programmers. Through games, animations, and real coding projects, campers discover the creative power of software — one line at a time.",
    ageRange: "7-14",
    ageLabel: "age",
    duration: "Full-day",
    durationDays: "program over 5 days",
    durationHeading: "Duration",
    durationUnit: "program over 5 days",
    createdFor: "Created for children",
    tag: "CODING",
    borderColor: "#95C11F",
    iconSrc: withCDN("/workshop-logo/logo_camps.svg"),
    imageSrc:
      "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/photo%20(6).png",
    ribbonImage:
      "https://yefranchisees.b-cdn.net/frontend/Program-detail/ribbon_dekstop.png",
    mobileRibbonImage: "https://yefranchisees.b-cdn.net/frontend/Workshop/bg%20%284%29.png",
    categoryTag: "CODING",
    objectivesHeading: "Workshop Objectives",
    seeInActionHeadingColoredPart: "Coding Camps",
    seeInActionHeading: "THAT BRING CODE TO LIFE",
    whatKidsDiscoverHeading: "What Kids Discover",
    workshopHighlightsHeading: "Workshop highlights",
    objectives: CODING_OBJECTIVES,
    whatKidsDiscover: CODING_DISCOVERIES,
    workshopHighlights: CODING_HIGHLIGHTS,
    ctaText: "BOOK WORKSHOP",
    actionText: "Book Workshop",
    seeInActionTitle: "Coding Camps in Action",
    seeInActionDescription:
      "See young coders dive into games, animations, and real projects — discovering the creative side of technology through play, collaboration, and hands-on building.",
    autoScrollSliderImages: [
      "https://yefranchisees.b-cdn.net/media/super_admin/1779106216021_jwfy6kyjqa_photo-1.png",
      "https://yefranchisees.b-cdn.net/media/super_admin/1779106216043_5ulzu4mvoh5_photo.png",
      "https://yefranchisees.b-cdn.net/media/super_admin/1779106216044_w2bpv6ydqr_photo-2.png",
      "https://yefranchisees.b-cdn.net/media/super_admin/1779106217840_hrm1w5ckjkj_photo-3.png",
      "https://yefranchisees.b-cdn.net/media/super_admin/1779106217841_vjmrj4ln8r_photo-4.png",
    ],
    reverseAutoScrollSliderImages: [
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_5.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_6.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_7.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_8.png",
      "https://yefranchisees.b-cdn.net/frontend/Workshop/Camp/camps_scroll_photo_3.png",
    ],
    animatedScrollItems: [
      "NEW REALITY FOR YOUR CHILD",
      "GREAT OPPORTUNITIES",
      "TEAMWORK",
      "NEW REALITY FOR YOUR CHILD",
      "GREAT OPPORTUNITIES",
      "TEAMWORK",
    ],
    gallerySlides: [
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/Hay%20Gate%201.png",
        title: "Building Phase",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/Hay%20Gate%201.png",
        title: "Testing & Learning",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/Hay%20Gate%201.png",
        title: "Team Collaboration",
      },
      {
        img: "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/Hay%20Gate%201.png",
        title: "Success Celebration",
      },
    ],
    heroBgMobile:
      "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/bg_hero-coding-mobile1.png",
    heroBgDesktop:
      "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/bg_hero-screen4%20(1).png",
    objectivesBgMobile:
      "https://yefranchisees.b-cdn.net/frontend/Program-detail/bg_Program-Objectives.png",
    objectivesBgDesktop:
      "https://yefranchisees.b-cdn.net/frontend/discover/bg%20(14).png",
    discoveriesBgMobile:
      "https://yefranchisees.b-cdn.net/frontend/Workshop/bg_What%20Kids%20Discover%20(1)%20(1)%20(1).png",
    discoveriesBgDesktop:
      "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/bg_What%20Kids%20Discover%20(3).png",
    highlightsBgMobile:
      "https://yefranchisees.b-cdn.net/frontend/Program-detail/bg_program%20highlights.png",
    highlightsBgDesktop:
      "https://yefranchisees.b-cdn.net/frontend/additional%20activities.png",
    highlightsMobileImageSrc:
      "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/Pendulum%20ride%201%20(1).png",
    highlightsDesktopImageSrc:
      "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/Pendulum%20ride%201%20(1).png",
    highlightsImageSrc:
      "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/Hay%20Gate%201.png",
    galleryImageSrc:
      "https://yefranchisees.b-cdn.net/frontend/discover/coding-camp/What%20Kids%20Discover%20new.png",
    discoverTextColor: "#58585A",

    featureSection: {
     AiSubtitle: "Supported Playful Coding",
     AiDescription:
      "In Coding Camps, students explore AI through fun, practical coding challenges. Using the GoAlgo App, they receive AI Chat support while building commands, logic, and event-based actions. They also experiment with machine learning by training the AI to recognize sounds, actions, or facial expressions, turning real-world inputs into coded responses. This introduces students to how AI learns from patterns and triggers actions through code.",
     AiImage:"https://yefranchisees.b-cdn.net/frontend/programs-page/pct-16.png",
     AiButtonText: "SIGN UP FOR A TRIAL LESSON",
     AiButtonLink: "#footerForm",
     reverse: false,
     AiGradientStart: "#8DC63F",
     AiGradientEnd: "#8DC63F",
   },
  },
};

/**
 * Get static workshop data by slug
 * Matches the base slug from the API slug
 */
function getStaticDataBySlug(slug: string): WorkshopDetailData | null {
  if (!slug) return null;

  const s = slug.toUpperCase();

  const slugToKeyMap: Record<string, keyof typeof WORKSHOPS_DATA> = {
    "SUMMER_CAMP": "camps",
    "BIRTHDAY_PARTIES": "birthday",
    "BUILD_UP": "build",
    "PRO": "pro",
    "GOLDEN_AGE": "golden",
    "MECHANICS_CAMPS": "mechanics",
    "CODING_CAMPS": "coding",
  };

  // Try direct mapping
  if (slugToKeyMap[s]) {
    return WORKSHOPS_DATA[slugToKeyMap[s]] || null;
  }

  // Try substring matching
  for (const [key, value] of Object.entries(slugToKeyMap)) {
    if (s.includes(key)) {
      return WORKSHOPS_DATA[value] || null;
    }
  }

  return null;
}


export const getWorkshopDetailById = cache(async (
  workshopId: string,
  domain?: string,
  language?: string,
  franchiseeId?: string | null
): Promise<WorkshopDetailDataWithTranslations> => {
  const startTime = Date.now();
  try {

    // Common headers
    const headers = domain ? { "X-Domain": domain } : {};

    // 1. Fetch default (English) version
    // We explicitly clear the lang param for the default fetch to ensure we get the base content
    const defaultResponse = await apiClient.get<any>(`activity/${workshopId}`, {
      headers,
      params: { lang: "default", language: "default" }
    });

    // 2. Fetch translated version if a language is provided
    let translatedResponse = null;
    if (language && language !== "default") {
      // The interceptor will automatically inject the correct lang/language/franchiseeId
      // but we can also pass them explicitly to be safe
      translatedResponse = await apiClient.get<any>(`activity/${workshopId}`, {
        headers,
        params: { lang: language, language: language }
      });
    }

    // Use translated response if default failed but translated succeeded
    let validResponse = defaultResponse;
    if (!defaultResponse.data?.status && translatedResponse?.data?.status) {
      validResponse = translatedResponse;
    }

    // Check if API response is valid
    if (!validResponse.data?.status || !validResponse.data?.data) {
      return {
        default: WORKSHOPS_DATA["camps"],
        translated: undefined,
      };
    }

    const apiData = validResponse.data.data;
    const activityDetails = apiData.activity_details || {};
    const workshopDetails = activityDetails.workshop_details || apiData.workshop_details || {};
    const slug = apiData.slug || "";

    // Get static data from local WORKSHOPS_DATA using slug
    const staticData = getStaticDataBySlug(slug) || WORKSHOPS_DATA["camps"];

    const elapsed = Date.now() - startTime;

    // Function to map API data to WorkshopDetailData
    const mapToWorkshopDetailData = (apiData: any, activityDetails: any, workshopDetails: any): WorkshopDetailData => ({
      id: apiData.id,
      cwProgramId: apiData.cw_program_id ?? null,
      slug: slug,

      // CONTENT from API only
      title: apiData.title,
      subtitle: activityDetails.activity_heading || "",
      description: activityDetails.activity_description || "",
      seoTitle: apiData.seo_title || undefined,
      seoDescription: apiData.seo_description || undefined,
      ageRange: activityDetails.age || "",
      duration: activityDetails.duration || "",
      durationDays: `program duration: ${activityDetails.duration || "N/A"}`,
      ctaText: activityDetails.cta_button?.text || workshopDetails.action_text?.book_workshop_cta || staticData.ctaText || "BOOK WORKSHOP",

      // API-driven label / metadata fields (with fallbacks)
      tag: activityDetails.tag || staticData.categoryTag || "",
      categoryTag: activityDetails.tag || staticData.categoryTag || "",
      createdFor: activityDetails.created_for || "Created for",
      ageLabel: activityDetails.age_text || "",
      durationHeading: activityDetails.duration_heading || "Duration",
      durationUnit: activityDetails.duration_text || "",

      // STYLING from static data ONLY
      borderColor: staticData.borderColor,
      iconSrc: apiData.activity_icon ? withCDN(apiData.activity_icon) : staticData.iconSrc,
      // Use API image if provided, else fall back to static
      imageSrc: activityDetails.image && activityDetails.image.trim() !== ""
        ? activityDetails.image
        : staticData.imageSrc,
      ribbonImage: staticData.ribbonImage,
      mobileRibbonImage: staticData.mobileRibbonImage,

      // Objectives from API - content only, icons from static data by index
      objectives: (workshopDetails.objectives?.items || []).map((item: string, index: number) => ({
        icon: staticData.objectives[index]?.icon || staticData.objectives[0]?.icon,
        title: item,
        description: item,
      })),

      // What kids discover from API - content only, icons from static data by index
      whatKidsDiscover: (workshopDetails.discover_section?.points || []).map((point: string, index: number) => ({
        icon: staticData.whatKidsDiscover[index]?.icon || staticData.whatKidsDiscover[0]?.icon,
        text: point,
      })),

      // Workshop highlights from API - content only
      workshopHighlights: (workshopDetails.workshop_highlights?.items || []).map((item: any) => ({
        title: item.title || "",
        description: item.description || "",
      })),

      actionText: workshopDetails.action_text?.title || staticData.actionText,
      seeInActionTitle: workshopDetails.action_text?.title || staticData.seeInActionTitle,
      seeInActionDescription: workshopDetails.action_text?.text || staticData.seeInActionDescription,

      // Headings from API
      objectivesHeading: workshopDetails.objectives?.heading || "Workshop Objectives",
      seeInActionHeadingColoredPart: workshopDetails.action_text?.title
        ? ""
        : (apiData.title || staticData.seeInActionHeadingColoredPart),
      seeInActionHeading: workshopDetails.action_text?.title
        ? workshopDetails.action_text.title
        : staticData.seeInActionHeading,
      whatKidsDiscoverHeading: workshopDetails.discover_section?.heading || "What Kids Discover",
      workshopHighlightsHeading: workshopDetails.workshop_highlights?.heading || "Workshop highlights",

      // Styling & images from static data (for consistency & not in API)
      highlightsImageSrc: staticData.highlightsImageSrc,
      galleryImageSrc: staticData.galleryImageSrc,

      // Use API slider images if provided, else fall back to static data
      autoScrollSliderImages:
        workshopDetails.sliders?.sliderImages && workshopDetails.sliders.sliderImages.length > 0
          ? workshopDetails.sliders.sliderImages
          : staticData.autoScrollSliderImages,
      reverseAutoScrollSliderImages:
        workshopDetails.sliders?.reverseSliderImages && workshopDetails.sliders.reverseSliderImages.length > 0
          ? workshopDetails.sliders.reverseSliderImages
          : staticData.reverseAutoScrollSliderImages,

      // Use API slider_texts for animated scroll if provided, else fall back to static
      animatedScrollItems:
        workshopDetails.slider_texts && workshopDetails.slider_texts.length > 0
          ? workshopDetails.slider_texts
          : staticData.animatedScrollItems,
      // Objectives robot gallery: admin-managed (workshop_details.gallery_slides)
      // overlaid on the static gallery; falls back to static when none set.
      gallerySlides: (() => {
        const apiSlides = Array.isArray(workshopDetails.gallery_slides)
          ? workshopDetails.gallery_slides
              .map((s: any) => ({
                img: (s?.robot_image || "").toString().trim(),
                title: (s?.tag || "").toString().trim(),
              }))
              .filter((s: GallerySlide) => s.img || s.title)
          : [];
        return apiSlides.length > 0 ? apiSlides : staticData.gallerySlides;
      })(),

      // Hero backgrounds from static data
      heroBgMobile: staticData.heroBgMobile,
      heroBgDesktop: staticData.heroBgDesktop,

      // Section backgrounds from static data
      objectivesBgMobile: staticData.objectivesBgMobile,
      objectivesBgDesktop: staticData.objectivesBgDesktop,
      discoveriesBgMobile: staticData.discoveriesBgMobile,
      discoveriesBgDesktop: staticData.discoveriesBgDesktop,
      highlightsBgMobile: staticData.highlightsBgMobile,
      highlightsBgDesktop: staticData.highlightsBgDesktop,

      // Highlight images from static data
      highlightsMobileImageSrc: staticData.highlightsMobileImageSrc,
      highlightsDesktopImageSrc: staticData.highlightsDesktopImageSrc,

      // Per-workshop text color override for the discover section (static only)
      discoverTextColor: staticData.discoverTextColor,

      // AI section: admin-managed content (activity_details.feature_section) overlaid
      // on the static image/gradient; falls back to fully static when not set.
      featureSection: (() => {
        const apiFeature = activityDetails.feature_section;
        const staticFeature = staticData?.featureSection;
        const hasApi =
          apiFeature &&
          ((apiFeature.sub_heading || "").toString().trim() ||
            (apiFeature.description || "").toString().trim());
        if (!hasApi) return staticFeature;
        return {
          heading: apiFeature.heading || staticFeature?.heading || "AI",
          AiSubtitle: apiFeature.sub_heading || staticFeature?.AiSubtitle || "",
          AiDescription:
            apiFeature.description || staticFeature?.AiDescription || "",
          AiButtonText:
            apiFeature.cta_text || staticFeature?.AiButtonText || "SIGN UP FOR A TRIAL LESSON",
          AiButtonLink: apiFeature.cta_url || staticFeature?.AiButtonLink || "#footerForm",
          AiImage:
            staticFeature?.AiImage ||
            "https://yefranchisees.b-cdn.net/frontend/programs-page/Group-290910.png",
          reverse: staticFeature?.reverse ?? false,
          AiGradientStart: staticFeature?.AiGradientStart || "#226B20",
          AiGradientEnd: staticFeature?.AiGradientEnd || "#6ECF68",
        };
      })(),

      // Bottom slider items from admin (filter empties)
      bottomSliders: Array.isArray(activityDetails.bottom_sliders)
        ? activityDetails.bottom_sliders
          .map((item: any) => ({
            tag: (item?.tag || "").toString().trim(),
            title: (item?.title || "").toString().trim(),
            robot_image: (item?.robot_image || "").toString().trim(),
          }))
          .filter(
            (item: { tag: string; title: string; robot_image: string }) =>
              item.tag || item.title || item.robot_image,
          )
        : [],
    });

    // Map default data
    const defaultMappedData = mapToWorkshopDetailData(apiData, activityDetails, workshopDetails);

    // Map translated data if available
    let translatedMappedData: WorkshopDetailData | undefined;
    if (translatedResponse?.data?.status && translatedResponse?.data?.data) {
      const translatedApiData = translatedResponse.data.data;
      const translatedActivityDetails = translatedApiData.activity_details || {};
      const translatedWorkshopDetails = translatedActivityDetails.workshop_details || translatedApiData.workshop_details || {};
      translatedMappedData = mapToWorkshopDetailData(
        translatedApiData,
        translatedActivityDetails,
        translatedWorkshopDetails
      );
    }

    return {
      default: defaultMappedData,
      translated: translatedMappedData,
    };
  } catch (error) {
    console.error("[WorkshopDetailService] Error fetching workshop detail:", error);
    // Return fallback data
    const fallbackData = WORKSHOPS_DATA["camps"];
    return {
      default: fallbackData,
      translated: undefined,
    };
  }
});
