/* global React */

const GUIDE_PAGES = {
  "listowel-accommodation": {
    eyebrow: "Listowel Accommodation",
    title: "A private townhouse stay in central Listowel",
    intro: "Stay at 59 William Street, a restored four-bedroom townhouse on one of Listowel's most convenient town-centre streets, with the privacy of a whole house and the ease of walking to cafés, pubs, shops and heritage sights.",
    image: window.WS_PHOTO_SRC("livingRoom1", 1),
    sections: [
      {
        title: "Stay in the centre of town",
        text: "The house sits on William Street, close to Listowel's cafés, traditional pubs, restaurants, independent shops and heritage streets. It works well for family visits, short breaks, festival stays and guests using Listowel as a north Kerry base.",
      },
      {
        title: "Room for up to 10 guests",
        text: "Four bedrooms, five beds, 2.5 bathrooms, a fully equipped kitchen, a dining room and a calm living room give families and groups space to settle in properly, without the compromises of separate hotel rooms.",
      },
      {
        title: "Direct stay enquiries",
        text: "Choose your preferred dates on the booking page and send a direct stay enquiry. We check the connected calendar, confirm availability by reply, and agree terms before any payment is arranged.",
      },
    ],
    faqs: [
      {
        question: "Is 59 William Street suitable for a family stay in Listowel?",
        answer: "Yes. The house is booked as a private four-bedroom townhouse for up to 10 guests, so families and groups have shared living space, a kitchen, dining room and 2.5 bathrooms rather than separate hotel rooms.",
      },
      {
        question: "Do guests need a car in Listowel?",
        answer: "A car is useful for Ballybunion, Tralee and Wild Atlantic Way day trips, but day-to-day Listowel is very walkable from William Street.",
      },
      {
        question: "Can I book directly on the website?",
        answer: "At this stage the website takes direct stay enquiries. Choose your dates, send your details, and we will reply with availability and next steps.",
      },
    ],
    links: [
      { label: "View The House", page: "house" },
      { label: "Check Availability", page: "book" },
      { label: "Things to Do in Listowel", page: "things-to-do-in-listowel" },
    ],
  },
  "townhouse-accommodation-listowel": {
    eyebrow: "Townhouse Accommodation",
    title: "Elegant townhouse accommodation in Listowel",
    intro: "For guests who prefer a whole-house stay, 59 William Street brings together heritage character, warm interiors and practical comfort in the centre of Listowel.",
    image: window.WS_PHOTO_SRC("kitchen", 0),
    sections: [
      {
        title: "Designed for proper stays",
        text: "The kitchen is set up for proper meals, the dining room is made for gathering, and the living room gives everyone a comfortable place to relax after a day in town, at a family event, or out on the coast.",
      },
      {
        title: "Bedrooms with flexibility",
        text: "Four bedrooms and five beds make the house suitable for couples, friends, families and guests visiting Listowel for festivals, golf, weddings or longer Kerry weekends.",
      },
      {
        title: "A quieter alternative to a hotel",
        text: "You have the privacy of the whole townhouse while staying close to Listowel's restaurants, pubs and local life. It is a more personal base than a hotel, with room to unpack and settle in.",
      },
    ],
    faqs: [
      {
        question: "What makes a townhouse stay different from a hotel?",
        answer: "A townhouse stay gives you the full house: bedrooms, living room, dining space and kitchen. It suits guests who want privacy, shared time and a more local rhythm.",
      },
      {
        question: "How many guests can stay at 59 William Street?",
        answer: "The Airbnb listing sets the house up for up to 10 guests across four bedrooms and five beds, with 2.5 bathrooms for a more comfortable group stay.",
      },
      {
        question: "Is the house central?",
        answer: "Yes. 59 William Street is in central Listowel, close to the town's cafés, pubs, shops and heritage streets.",
      },
    ],
    links: [
      { label: "Explore Rooms", page: "house" },
      { label: "Listowel Accommodation", page: "listowel-accommodation" },
      { label: "Send Stay Enquiry", page: "book" },
    ],
  },
  "wedding-accommodation-listowel": {
    eyebrow: "Weddings in Kerry",
    title: "A character townhouse for wedding stays in Listowel",
    intro: "59 William Street gives wedding guests, families and couples a private four-bedroom townhouse in the centre of Listowel, with elegant interiors for the morning of the celebration and easy access to Kerry venues, churches, restaurants and the coast.",
    image: window.WS_PHOTO_SRC("exterior", 1),
    heroCtaLabel: "Enquire For Weddings",
    heroCtaPage: "contact",
    ctaTitle: "Planning a wedding stay or bridal morning?",
    ctaBody: "Send the date, guest count and what you need arranged. We can confirm availability and discuss the right setup before any payment is taken.",
    ctaPrimaryLabel: "Send Wedding Enquiry",
    ctaPrimaryPage: "contact",
    ctaSecondaryLabel: "View The House",
    ctaSecondaryPage: "house",
    sidebarEyebrow: "Wedding Planning",
    sections: [
      {
        title: "Private accommodation for family and guests",
        text: "The house is booked as a private townhouse, giving wedding guests shared space to get ready, gather between events and stay together without splitting across multiple hotel rooms.",
      },
      {
        title: "A refined setting for the morning of the wedding",
        text: "Character rooms, a warm dining area, elegant bedrooms and the restored facade give photographers natural backdrops for bridal prep, portraits, detail shots and quiet family moments before the day begins.",
      },
      {
        title: "Support for local arrangements",
        text: "Wedding enquiries can include notes about photographer access, arrival timing, flowers, styling, transport, early setup, late checkout requests or local recommendations. Each request is reviewed manually so the plan fits the date.",
      },
      {
        title: "A Kerry base before and after the celebration",
        text: "Listowel works well for pre-wedding stays, family weekends and post-wedding recovery days, with Ballybunion, Tralee, Dingle and the Wild Atlantic Way within reach for guests extending their trip.",
      },
    ],
    faqs: [
      {
        question: "Can the house be used for bridal morning preparation?",
        answer: "Yes, by enquiry and subject to availability. Share the date, guest numbers, photographer timing and any setup needs so the arrangement can be confirmed in advance.",
      },
      {
        question: "Is 59 William Street suitable for wedding guests?",
        answer: "Yes. The townhouse has four bedrooms, five beds and 2.5 bathrooms, making it practical for family members or small guest groups staying together in central Listowel.",
      },
      {
        question: "Can you help arrange extras such as a photographer or styling?",
        answer: "Extras are handled by enquiry. The site can collect the request and the host can advise on local options, timings and what is realistic for the house setup.",
      },
    ],
    links: [
      { label: "View The House", page: "house" },
      { label: "Photo Shoot Location", page: "photo-shoot-location-listowel" },
      { label: "Send Wedding Enquiry", page: "contact" },
    ],
  },
  "photo-shoot-location-listowel": {
    eyebrow: "Photo Shoots & Content",
    title: "A stylish Listowel location for photoshoots and filming",
    intro: "Use 59 William Street as a character-rich location for wedding content, editorial portraits, interiors, brand photography, small video shoots and creative days in the heart of Listowel.",
    image: "/assets/gallery-dining-detail.jpg",
    heroCtaLabel: "Enquire For Shoots",
    heroCtaPage: "contact",
    ctaTitle: "Need the house for a shoot?",
    ctaBody: "Send the date, shoot type, crew size and access requirements. We will review availability and confirm whether the house is suitable for your plan.",
    ctaPrimaryLabel: "Send Shoot Enquiry",
    ctaPrimaryPage: "contact",
    ctaSecondaryLabel: "View Gallery",
    ctaSecondaryPage: "gallery",
    sidebarEyebrow: "Shoot Planning",
    sections: [
      {
        title: "Interiors with strong visual identity",
        text: "The townhouse offers a mix of restored character, stone, warm timber, clean kitchen lines, styled bedrooms, layered textures and intimate corners that work well for editorial and lifestyle content.",
      },
      {
        title: "Exterior and street-level character",
        text: "The William Street facade, heritage shopfront details and town-centre setting give photographers a distinct Listowel look without needing to move far between interior and exterior setups.",
      },
      {
        title: "Photographer and production requests",
        text: "Shoot enquiries can include a request for photographer coordination, content planning, access windows, room priorities, props, styling notes or requirements for commercial photography and filming.",
      },
      {
        title: "Useful for weddings, brands and local campaigns",
        text: "The location can support bridal prep, couple portraits, accommodation content, food and hospitality imagery, small brand shoots, social media reels and Kerry travel storytelling.",
      },
    ],
    faqs: [
      {
        question: "Can I book the house only for a photoshoot?",
        answer: "Photoshoot and filming use is handled by direct enquiry. Availability, timing, crew size and intended use need to be reviewed before approval.",
      },
      {
        question: "Can a photographer be arranged?",
        answer: "The website can collect the request and the host can advise on local photographer options or coordinate next steps where possible.",
      },
      {
        question: "Is commercial photography allowed?",
        answer: "Commercial photography and filming may be possible by prior agreement. The request should include the brand, usage, crew size, timing and any equipment needs.",
      },
    ],
    links: [
      { label: "Wedding Stays", page: "wedding-accommodation-listowel" },
      { label: "View Gallery", page: "gallery" },
      { label: "Send Shoot Enquiry", page: "contact" },
    ],
  },
  "family-accommodation-listowel": {
    eyebrow: "Family Accommodation Listowel",
    title: "A private Listowel townhouse for family stays",
    intro: "59 William Street gives families a whole four-bedroom townhouse in central Listowel, with five beds, 2.5 bathrooms and shared spaces where up to 10 guests can stay together comfortably.",
    image: window.WS_PHOTO_SRC("bedroom1Orange", 4),
    sections: [
      {
        title: "Keep the family together under one roof",
        text: "Instead of dividing a family across separate hotel rooms, the townhouse provides four bedrooms plus a kitchen, dining room and two living areas. Children, parents and grandparents can share meals and plans while still having private rooms to return to.",
      },
      {
        title: "A practical layout for a Listowel family break",
        text: "The house sleeps up to 10 guests across five beds and has 2.5 bathrooms arranged across its three floors. The kitchen supports proper breakfasts and evening meals, while the dining table and lounges give everyone space between days out in Kerry.",
      },
      {
        title: "Walk to the centre of Listowel",
        text: "William Street places guests close to cafés, pubs, independent shops, Listowel Castle and the town's heritage streets. A car is useful for the coast, but families can enjoy much of Listowel without driving once they arrive.",
      },
      {
        title: "Plan family days around North Kerry",
        text: "Ballybunion Beach is around 30 minutes away by car, with Tralee, Fenit and other Wild Atlantic Way stops suitable for day trips. Returning to one familiar base makes multi-day family travel simpler.",
      },
    ],
    faqs: [
      { question: "How many people can stay at 59 William Street?", answer: "The whole townhouse accommodates up to 10 guests across four bedrooms and five beds." },
      { question: "Does the house work for families with children?", answer: "Yes. The private whole-house layout, shared living spaces and self-catering kitchen suit families, although guests should note that the three-storey property includes stairs." },
      { question: "Can we request family dates directly?", answer: "Yes. Select your preferred dates on the Book page and send an enquiry. Availability is checked against the connected Airbnb calendar before the stay is confirmed." },
    ],
    links: [
      { label: "Explore The House", page: "house" },
      { label: "Things to Do in Listowel", page: "things-to-do-in-listowel" },
      { label: "Check Family Dates", page: "book" },
    ],
  },
  "group-accommodation-listowel": {
    eyebrow: "Group Accommodation Listowel",
    title: "Stay together in a private Listowel townhouse",
    intro: "For small groups visiting Listowel, 59 William Street combines four bedrooms and five beds with the shared kitchen, dining and living spaces that make a group stay work properly.",
    image: window.WS_PHOTO_SRC("diningRoom", 1),
    sections: [
      {
        title: "Group accommodation for up to 10 guests",
        text: "The house is booked as one private property for up to 10 guests. Four bedrooms allow couples, friends and family members to divide the sleeping arrangements, while 2.5 bathrooms help the group prepare for busy mornings and events.",
      },
      {
        title: "Shared spaces made for time together",
        text: "A full kitchen, dining room and two separate living areas give the group options throughout the day. Guests can cook, plan an itinerary, gather for a meal or spread out without relying on hotel lobbies and restaurant bookings for every meeting.",
      },
      {
        title: "Useful for weddings, golf and festival weekends",
        text: "The central location suits wedding guests, golf groups travelling to Ballybunion, friends attending Listowel events and families gathering for an occasion. Tell us the purpose of the stay in the enquiry so practical questions can be answered before confirmation.",
      },
      {
        title: "Central Listowel after the day's plans",
        text: "Guests can walk from William Street to local pubs, cafés and restaurants. The location makes the evening easier when the group wants to go out together without arranging multiple cars across town.",
      },
    ],
    faqs: [
      { question: "Is the townhouse rented room by room?", answer: "No. Stay enquiries are for the whole townhouse, giving the group private use of the bedrooms and shared spaces." },
      { question: "Is 59 William Street suitable for a golf group?", answer: "Yes. The property sleeps up to 10 guests and is around 30 minutes by car from Ballybunion Golf Club." },
      { question: "Are parties automatically permitted?", answer: "Events and special arrangements require prior agreement. Include the occasion, guest count and proposed schedule in the enquiry so the host can confirm what is suitable." },
    ],
    links: [
      { label: "View All Rooms", page: "house" },
      { label: "Ballybunion Golf Stays", page: "ballybunion-golf-accommodation" },
      { label: "Send Group Enquiry", page: "book" },
    ],
  },
  "self-catering-accommodation-listowel": {
    eyebrow: "Self-Catering Listowel",
    title: "Self-catering accommodation in central Listowel",
    intro: "59 William Street is a whole-house self-catering stay with a fully equipped contemporary kitchen, generous dining space and four bedrooms in the centre of Listowel.",
    image: window.WS_PHOTO_SRC("kitchen", 11),
    sections: [
      {
        title: "A kitchen designed for real stays",
        text: "Full-size appliances, generous worktops, storage and tableware make the kitchen useful beyond preparing tea and toast. Guests can organise breakfast before a day trip, cook for the group or keep food ready for children and different schedules.",
      },
      {
        title: "Dining space for the whole group",
        text: "The dining room connects naturally with the open-plan kitchen and living area. It works for family meals, takeaway evenings, planning the next day's route or spending a slower evening inside the townhouse.",
      },
      {
        title: "Shops, cafés and restaurants close by",
        text: "Self-catering does not mean staying outside town. From William Street, guests can walk to local shops for supplies and choose between cooking at home or visiting Listowel's cafés, pubs and restaurants.",
      },
      {
        title: "A stable base for several nights in Kerry",
        text: "Four bedrooms, five beds and 2.5 bathrooms make the property practical for longer family or group stays. Guests can unpack once and use Listowel as a base for Ballybunion, Tralee, Dingle and North Kerry day trips.",
      },
    ],
    faqs: [
      { question: "Does 59 William Street have a full kitchen?", answer: "Yes. The property has a fully equipped kitchen with full-size appliances, preparation space, cookware and tableware for a proper self-catering stay." },
      { question: "Are grocery shops close to the house?", answer: "The townhouse is in central Listowel, with shops and everyday services available in town. Exact recommendations can be provided with the stay information." },
      { question: "How do I request a self-catering stay?", answer: "Choose the dates on the Book page and send a direct enquiry with the guest count and any specific kitchen or arrival requirements." },
    ],
    links: [
      { label: "Explore The Kitchen", page: "room:kitchen" },
      { label: "Family Accommodation", page: "family-accommodation-listowel" },
      { label: "Check Availability", page: "book" },
    ],
  },
  "things-to-do-in-listowel": {
    eyebrow: "Local Guide",
    title: "Things to do in Listowel during your stay",
    intro: "Listowel is a walkable Kerry heritage town known for literary history, colourful streets, traditional pubs, good coffee, local shops and easy access to the north Kerry coast.",
    image: "/assets/photo-listowel-street.jpg",
    sections: [
      {
        title: "Walk the heritage town",
        text: "Start with Listowel Castle, the town square, the river walk and the old shopfronts that give the town its character. From 59 William Street, the centre of town is easy to explore without planning every stop.",
      },
      {
        title: "Cafes, pubs and restaurants",
        text: "From morning coffee to an evening pint, Listowel is easy to enjoy on foot from 59 William Street. Guests can eat out, browse local shops and return to the house without needing to drive across town.",
      },
      {
        title: "Use Listowel as a Kerry base",
        text: "Ballybunion, Fenit, Tralee, Dingle and the Wild Atlantic Way are all within reach for day trips, while Listowel gives you a comfortable townhouse base to come back to in the evening.",
      },
    ],
    faqs: [
      {
        question: "What can you do in Listowel without driving?",
        answer: "You can walk to cafés, pubs, shops, Listowel Castle, heritage streets and riverside routes from the house.",
      },
      {
        question: "Is Listowel good for a weekend break?",
        answer: "Yes. Listowel works well for a slower weekend with local food, pubs, heritage, shops and easy access to the north Kerry coast.",
      },
      {
        question: "What day trips are easy from Listowel?",
        answer: "Ballybunion, Fenit, Tralee and sections of the Wild Atlantic Way are natural day trips from Listowel.",
      },
    ],
    links: [
      { label: "Explore Listowel", page: "listowel" },
      { label: "Wild Atlantic Way Base", page: "wild-atlantic-way-base-listowel" },
      { label: "Book Direct", page: "book" },
    ],
  },
  "day-trips-from-listowel": {
    eyebrow: "Kerry Day Trips",
    title: "Day trips from Listowel for coast, culture and scenery",
    intro: "Listowel makes a practical North Kerry base for Ballybunion, Tralee, Fenit, Castlegregory and Dingle, with a private townhouse to return to after the drive.",
    image: "/assets/dingle-peninsula-harbour-mountain-view.jpg",
    sections: [
      {
        title: "Ballybunion Beach and cliffs",
        text: "Ballybunion is the easiest coastal day trip from Listowel at around 30 minutes by car. Visit the long Atlantic beach, cliff walks and castle ruins, or combine the coast with a golf booking at Ballybunion Golf Club.",
      },
      {
        title: "Tralee and Fenit Harbour",
        text: "Tralee offers shopping, museums and family attractions, while nearby Fenit adds harbour views, coastal walks and access to Tralee Bay. The two can be combined into one relaxed day without changing accommodation.",
      },
      {
        title: "Castlegregory and the Dingle Peninsula",
        text: "A longer drive brings guests to Castlegregory's beaches and the mountain-and-sea landscapes of the Dingle Peninsula. Leave time for weather changes, viewpoint stops and an unhurried meal rather than trying to cover the entire peninsula at once.",
      },
      {
        title: "Return to Listowel for the evening",
        text: "Staying in one place means the group can return to familiar rooms, walk out for food or prepare dinner in the kitchen. It is often more comfortable than moving luggage between coastal stops every night.",
      },
    ],
    faqs: [
      { question: "What is the easiest beach day trip from Listowel?", answer: "Ballybunion is the closest major coastal destination and is generally around 30 minutes away by car." },
      { question: "Can Dingle be visited as a day trip from Listowel?", answer: "Yes, but it is a longer day. Start early, choose a realistic section of the peninsula and allow for traffic, weather and scenic stops." },
      { question: "Do I need a car for these day trips?", answer: "A car is the most practical option for the coastal routes and smaller destinations listed on this page." },
    ],
    links: [
      { label: "Ballybunion Beach Guide", page: "ballybunion-beach-from-listowel" },
      { label: "Wild Atlantic Way Base", page: "wild-atlantic-way-base-listowel" },
      { label: "Check Dates", page: "book" },
    ],
  },
  "ballybunion-beach-from-listowel": {
    eyebrow: "Ballybunion Beach",
    title: "Visit Ballybunion Beach from your Listowel stay",
    intro: "Ballybunion's Atlantic beach, cliffs and castle ruins are around 30 minutes by car from 59 William Street, making the coast an easy part of a short stay in Listowel.",
    image: "/assets/ballybunion-beach-castle-atlantic-view-contained.jpg",
    sections: [
      {
        title: "A North Kerry beach day within easy reach",
        text: "Ballybunion is known for broad sandy strands, Atlantic surf and dramatic cliffs. The castle ruins above the beach form one of the area's most recognisable views and make the visit feel distinct from a standard seaside stop.",
      },
      {
        title: "Walking, swimming and seasonal conditions",
        text: "The beach works well for a long walk, photography and watching the Atlantic. Swimming conditions vary, so guests should follow local signage, weather information and lifeguard guidance where seasonal supervision is provided.",
      },
      {
        title: "Combine the beach with Ballybunion village or golf",
        text: "A coastal visit can be combined with food in the village, cliff viewpoints or a separate tee time at Ballybunion Golf Club. Golf should be booked independently and well in advance during the busier months.",
      },
      {
        title: "Why stay in Listowel",
        text: "Listowel gives guests a lively town-centre base with restaurants, pubs and a private four-bedroom house. After the beach, the group can return to the kitchen and living areas without relying on limited coastal accommodation.",
      },
    ],
    faqs: [
      { question: "How far is Ballybunion Beach from Listowel?", answer: "The journey is generally around 30 minutes by car, depending on traffic, weather and the exact parking area used." },
      { question: "Is Ballybunion suitable for a family day trip?", answer: "Yes, but families should check current sea conditions, local signage and seasonal lifeguard information before swimming." },
      { question: "Can we stay at 59 William Street for a Ballybunion trip?", answer: "Yes. The townhouse provides four bedrooms and space for up to 10 guests, with Ballybunion accessible as a coastal day trip." },
    ],
    links: [
      { label: "Day Trips from Listowel", page: "day-trips-from-listowel" },
      { label: "Ballybunion Golf Stay", page: "ballybunion-golf-accommodation" },
      { label: "Send Stay Enquiry", page: "book" },
    ],
  },
  "wild-atlantic-way-base-listowel": {
    eyebrow: "Wild Atlantic Way Base",
    title: "A comfortable Listowel base for the Wild Atlantic Way",
    intro: "From 59 William Street you can reach Ballybunion and the Atlantic coast quickly, then return to a private townhouse in a lively Kerry heritage town with food, pubs and shops close by.",
    image: "/assets/photo-wild-atlantic.jpg",
    sections: [
      {
        title: "Ballybunion and the coast",
        text: "Ballybunion beach and cliffs are about a 30-minute drive, making coastal walks, sea air and sunset trips easy to plan around your stay in Listowel.",
      },
      {
        title: "Day trips across Kerry",
        text: "Fenit Harbour, Tralee and the Dingle Peninsula are natural day-trip options for guests who want scenery, food, music and Atlantic views without changing accommodation every night.",
      },
      {
        title: "Come back to town",
        text: "After a day on the road, Listowel gives you restaurants, pubs and the comfort of a whole-house stay, so the evening can be simple: park up, walk out, come home.",
      },
    ],
    faqs: [
      {
        question: "Is Listowel on the Wild Atlantic Way?",
        answer: "Listowel is an inland heritage town close to the north Kerry coast, making it a practical base for Ballybunion and Wild Atlantic Way day trips.",
      },
      {
        question: "How far is Ballybunion from Listowel?",
        answer: "Ballybunion is about a 30-minute drive from Listowel, depending on traffic and exact route.",
      },
      {
        question: "Why stay in Listowel instead of moving every night?",
        answer: "Listowel gives you a comfortable base with restaurants and pubs nearby, while still keeping coastal routes and Kerry day trips within reach.",
      },
    ],
    links: [
      { label: "Things to Do in Listowel", page: "things-to-do-in-listowel" },
      { label: "View Gallery", page: "gallery" },
      { label: "Check Dates", page: "book" },
    ],
  },
  "ballybunion-golf-accommodation": {
    eyebrow: "Ballybunion Golf Accommodation",
    title: "Stay near Ballybunion Golf Club in a private Listowel townhouse",
    intro: "59 William Street is around 30 minutes from Ballybunion Golf Club, with four bedrooms, five beds, 2.5 bathrooms and a central Listowel base that works well for golf trips and group stays.",
    image: "/assets/photo-ballybunion-golf.jpg",
    sections: [
      {
        title: "A practical base for golf groups",
        text: "The house sleeps up to 10 guests, with space to relax together, eat in, and plan early starts for Ballybunion or other Kerry links courses.",
      },
      {
        title: "Ballybunion within easy reach",
        text: "Ballybunion Golf Club is one of Ireland's great links destinations, and staying in Listowel keeps restaurants, pubs and shops close by for the rest of the trip.",
      },
      {
        title: "Direct enquiries for your dates",
        text: "Send your preferred dates, guest count and any trip notes through the booking form so availability can be checked against the connected calendar and confirmed by reply.",
      },
    ],
    faqs: [
      {
        question: "How far is 59 William Street from Ballybunion Golf Club?",
        answer: "The drive is around 30 minutes, which makes the house a practical Listowel base for Ballybunion golf trips.",
      },
      {
        question: "Is the house suitable for a golf group?",
        answer: "Yes. With four bedrooms, five beds, 2.5 bathrooms, a kitchen and shared living space, the house works well for golf groups.",
      },
      {
        question: "Can I mention tee times in the enquiry?",
        answer: "Yes. Add any tee times, arrival details or group notes in the message field when you send a stay enquiry.",
      },
    ],
    links: [
      { label: "View The House", page: "house" },
      { label: "Wild Atlantic Way Base", page: "wild-atlantic-way-base-listowel" },
      { label: "Send Golf Stay Enquiry", page: "book" },
    ],
  },
};

function GuidePage({ slug, onNavigate }) {
  const page = GUIDE_PAGES[slug] || GUIDE_PAGES["listowel-accommodation"];
  React.useEffect(() => {
    const id = "ws-guide-faq-schema";
    document.getElementById(id)?.remove();
    if (!page.faqs?.length) return undefined;

    const script = document.createElement("script");
    script.id = id;
    script.type = "application/ld+json";
    script.textContent = JSON.stringify({
      "@context": "https://schema.org",
      "@type": "FAQPage",
      mainEntity: page.faqs.map((item) => ({
        "@type": "Question",
        name: item.question,
        acceptedAnswer: {
          "@type": "Answer",
          text: item.answer,
        },
      })),
    });
    document.head.appendChild(script);
    return () => script.remove();
  }, [page]);

  const go = (event, target) => {
    event.preventDefault();
    onNavigate(target);
  };

  return (
    <div>
      <section className="ws-hero ws-hero--split ws-guide-hero">
        <div className="ws-hero__copy">
          <div className="ws-hero__eyebrow">{page.eyebrow}</div>
          <h1 className="ws-hero__title">{page.title}</h1>
          <p className="ws-hero__body">{page.intro}</p>
          <div className="ws-hero__cta">
            <a
              className="ws-btn ws-btn--ghost"
              href={pathForPage(page.heroCtaPage || "book")}
              onClick={(event) => go(event, page.heroCtaPage || "book")}
            >
              {page.heroCtaLabel || "Send Stay Enquiry"}
            </a>
          </div>
        </div>
        <div className="ws-hero__bg" style={{ backgroundImage: `url(${page.image})` }} />
      </section>

      <section className="ws-section ws-on-cream">
        <div className="ws-container">
          <div className="ws-guide-layout">
            <div className="ws-guide-copy">
              {page.sections.map((section) => (
                <article className="ws-guide-section" key={section.title}>
                  <h2>{section.title}</h2>
                  <p>{section.text}</p>
                </article>
              ))}
              {page.faqs && (
                <section className="ws-guide-section ws-guide-faq">
                  <div className="ws-guide-section__eyebrow">Guest Questions</div>
                  <h2>Helpful answers before you enquire</h2>
                  {page.faqs.map((item) => (
                    <details key={item.question}>
                      <summary>{item.question}</summary>
                      <p>{item.answer}</p>
                    </details>
                  ))}
                </section>
              )}
            </div>
            <aside className="ws-guide-card">
              <div className="ws-opener is-left">
                <div className="ws-opener__eyebrow">{page.sidebarEyebrow || "Plan Your Stay"}</div>
                <span className="ws-opener__rule"><span className="d" /></span>
              </div>
              <ul className="ws-guide-links">
                {page.links.map((link) => (
                  <li key={link.page}>
                    <a href={pathForPage(link.page)} onClick={(event) => go(event, link.page)}>
                      {link.label}
                      <Icon name="arrow-up-right" size={14} />
                    </a>
                  </li>
                ))}
              </ul>
            </aside>
          </div>
        </div>
      </section>

      <CTAStrip
        title={page.ctaTitle || "Ready to plan your stay?"}
        body={page.ctaBody || "Send your preferred dates and we'll come back with availability."}
        primaryLabel={page.ctaPrimaryLabel || "Check Dates"}
        secondaryLabel={page.ctaSecondaryLabel}
        onPrimary={() => onNavigate(page.ctaPrimaryPage || "book")}
        onSecondary={page.ctaSecondaryPage ? () => onNavigate(page.ctaSecondaryPage) : undefined}
      />
    </div>
  );
}

window.GUIDE_PAGES = GUIDE_PAGES;
window.GuidePage = GuidePage;
