/* De-ientes Bedford — September £35 new patient offer, built on the Showcase blocks. */
(function () {
  const e = React.createElement;
  const { useState, useEffect } = React;
  const Icon = window.Icon;

  const Btn = ({ variant = "ink", lg, block, href, onClick, type, children }) => {
    const cls = ["t3-btn", "t3-btn--" + variant, lg && "t3-btn--lg", block && "t3-btn--block"].filter(Boolean).join(" ");
    const inner = [children, e("span", { className: "arw", key: "a" }, e(Icon, { name: "chevR" }))];
    return href
      ? e("a", { className: cls, href, onClick }, inner)
      : e("button", { className: cls, onClick, type: type || "button" }, inner);
  };

  const NAV = [["What's included", "#offer"], ["Your first visit", "#day"], ["Find us", "#find"], ["Pricing", "#pricing"], ["FAQs", "#faq"]];

  const Nav = ({ cfg }) => e("div", { className: "t3-navwrap" },
    e("nav", { className: "t3-nav" },
      e("a", { className: "t3-brand", href: "#top" },
        e("img", { className: "t3-brand__logo", src: "assets/de-logo-full.png", alt: cfg.practice }),
        e("span", { className: "t3-loc" }, e(Icon, { name: "pin" }), cfg.location)),
      e("div", { className: "t3-navlinks" },
        NAV.slice(0, 4).map(([l, href], i) => e("a", { key: i, href }, l))),
      e("div", { className: "t3-navend" },
        e("a", { className: "t3-navphone", href: "tel:" + cfg.phone }, e(Icon, { name: "phone" }), e("span", null, cfg.phone)),
        e("a", { className: "t3-callbtn", href: "tel:" + cfg.phone, "aria-label": "Call us" }, e(Icon, { name: "phone" })),
        e(Btn, { variant: "ink", href: "#book" }, "Request your appointment"))));

  /* ActiveCampaign form 25, on the de-ientes account. AC injects its markup into
     ._form_25, then customiseACForm below rewrites it: treatment and location are
     hidden and pre-set, the button is relabelled, and a successful submission
     redirects to cfg.thankYou. Styling lives in ac-form.css. */
  const AC_FORM_ID = 31;
  const AC_TREATMENT = "Dental check-up";        // must match a field[13] option exactly
  const AC_BUTTON_LABEL = "Request your appointment";

  const setRadio = (name, value) => {
    const radio = document.querySelector(
      '._form_' + AC_FORM_ID + ' input[type="radio"][name="' + name + '"][value="' + value + '"]');
    if (radio && !radio.checked) {
      radio.checked = true;
      radio.dispatchEvent(new Event("change", { bubbles: true }));
    }
    return !!radio;
  };

  const customiseACForm = (cfg) => {
    const root = document.querySelector("._form_" + AC_FORM_ID);
    if (!root) return;

    // Treatment and location are fixed for this page, so hide both blocks. The
    // crm_form-header rows sit outside the fieldset, hence hiding by _form_element.
    ["treatment", "location"].forEach((word) => {
      root.querySelectorAll(".crm_form-header").forEach((header) => {
        if (header.textContent.toLowerCase().includes(word)) {
          const block = header.closest("._form_element");
          if (block) block.style.display = "none";
        }
      });
      root.querySelectorAll("._form-fieldset > legend").forEach((legend) => {
        if (legend.textContent.toLowerCase().includes(word)) {
          const block = legend.closest("._form_element");
          if (block) block.style.display = "none";
        }
      });
    });

    if (!setRadio("field[13]", AC_TREATMENT)) {
      console.warn("[ac-form] no field[13] option matching " + JSON.stringify(AC_TREATMENT));
    }
    if (!setRadio("field[14]", cfg.location)) {
      console.warn("[ac-form] no field[14] option matching " + JSON.stringify(cfg.location));
    }

    // AC sizes .crm_form-header from a rule scoped to its generated form id
    // (#_form_<hash>_), which outranks anything ac-form.css can say with class
    // selectors. Setting it inline with important priority avoids hard-coding
    // that hash, which changes if the form is rebuilt.
    root.querySelectorAll(".crm_form-header").forEach((header) => {
      if (header.closest("._form_element").style.display === "none") return;
      header.style.setProperty("font-size", "13px", "important");
      header.style.setProperty("line-height", "1.5", "important");
      header.style.setProperty("font-weight", "400", "important");
    });

    root.querySelectorAll('input[name="fullname"]').forEach((i) => (i.autocomplete = "name"));
    root.querySelectorAll('input[name="email"]').forEach((i) => (i.autocomplete = "email"));
    root.querySelectorAll('input[name="phone"]').forEach((i) => (i.autocomplete = "tel"));

    const submitBtn = root.querySelector("._submit");
    if (submitBtn) submitBtn.textContent = AC_BUTTON_LABEL;

    // Redirect on AC's own success element rather than on a timer, so a
    // submission that fails validation or POSTs badly stays put.
    const thanks = root.querySelector("._form-thank-you");
    if (thanks) {
      const seen = new MutationObserver(() => {
        if (thanks.offsetParent !== null) {
          seen.disconnect();
          window.location.href = encodeURI(cfg.thankYou);
        }
      });
      seen.observe(root, { attributes: true, childList: true, subtree: true, attributeFilter: ["style", "class"] });
    }

    // Open the privacy policy in a lightbox instead of leaving the page.
    const policyLink = root.querySelector(".p-disclaimer a");
    if (policyLink && !document.querySelector(".lightbox_overlay")) {
      const overlay = document.createElement("div");
      overlay.className = "lightbox_overlay";
      overlay.innerHTML =
        '<img class="close-policy" width="15" height="15" alt="Close" ' +
        'src="data:image/svg+xml;utf8,' +
        encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.5" stroke-linecap="round"><path d="M5 5l14 14M19 5L5 19"/></svg>') +
        '"><iframe title="Privacy policy"></iframe>';
      document.body.appendChild(overlay);

      const close = () => { overlay.style.display = "none"; };
      overlay.addEventListener("click", (ev) => {
        if (ev.target === overlay || ev.target.classList.contains("close-policy")) close();
      });
      document.addEventListener("keydown", (ev) => { if (ev.key === "Escape") close(); });
      policyLink.addEventListener("click", (ev) => {
        ev.preventDefault();
        // Loaded on first open rather than up front, so the page doesn't fetch
        // the policy on every visit.
        const frame = overlay.querySelector("iframe");
        if (!frame.getAttribute("src")) frame.setAttribute("src", policyLink.href);
        overlay.style.display = "block";
      });
    }
  };

  const FormCard = ({ cfg }) => {
    // The AC script has to run after React has mounted ._form_25, otherwise it
    // finds no target and the form never appears. AC then injects asynchronously
    // even after onload, so poll for the injected markup before customising it.
    useEffect(() => {
      let poll, giveUp;
      const run = () => {
        poll = setInterval(() => {
          if (!document.querySelector("._form_" + AC_FORM_ID + " ._form")) return;
          clearInterval(poll);
          clearTimeout(giveUp);
          customiseACForm(cfg);
        }, 100);
        giveUp = setTimeout(() => {
          clearInterval(poll);
          console.warn("[ac-form] form " + AC_FORM_ID + " did not render within 15s");
        }, 15000);
      };

      const src = "https://de-ientes.activehosted.com/f/embed.php?id=" + AC_FORM_ID;
      if (!document.querySelector('script[src="' + src + '"]')) {
        const s = document.createElement("script");
        s.src = src;
        s.charset = "utf-8";
        s.onload = run;
        s.onerror = () => console.warn("[ac-form] could not load " + src);
        document.body.appendChild(s);
      } else {
        run();
      }

      return () => { clearInterval(poll); clearTimeout(giveUp); };
    }, [cfg.location, cfg.thankYou]);

    return e("div", { className: "t3-formcard", id: "book" },
      e("div", { className: "t3-formcard__head" },
        e("div", { className: "t3-formcard__title" }, "Request your appointment"),
        e("div", { className: "t3-formcard__badge" }, "\u00a3", cfg.price, " in September")),
      e("p", { className: "t3-formcard__note" },
        "Leave your details and our Bedford team will call you back to arrange a time that works for you."),
      e("div", { className: "_form_" + AC_FORM_ID }),
      e("div", { className: "t3-formcard__foot" }, e(Icon, { name: "lock" }),
        "Your details are kept private and used only to arrange your visit."));
  };

  const Hero = ({ cfg }) => {
    const usps = [
      "Same trusted Bedford team, right in the heart of town",
      "Free on-site parking - no circling for a space",
      "25 years caring for Bedford families, three generations strong",
      "Wheelchair accessible throughout, with disabled parking on site",
    ];
    return e("section", { className: "t3-hero", id: "top" },
      e("div", { className: "t3-cont t3-hero__grid" },
        e("div", { className: "t3-hero__copy" },
          e("div", { className: "t3-hero__lead" },
            e("span", { className: "t3-eyebrow" }, e("span", { className: "dot" }), cfg.dateline),
            e("h1", { className: "t3-display" }, "New patient offer at ", e("span", { style: { whiteSpace: "nowrap" } }, "De-ientes"), " Bedford - ", e("span", { className: "alt" }, "just \u00a3", cfg.price))),
          e("div", { className: "t3-hero__rest" },
            e("p", { className: "t3-hero__addr" }, e(Icon, { name: "pin" }), "De-ientes ", cfg.location, " \u00b7 ", cfg.address)),
          e(FormCard, { cfg })),
        e("div", { className: "t3-hero__visual" },
          e("div", { className: "t3-hero__img" },
            e("img", { src: "assets/bedford-4.jpg", alt: "A patient at De-ientes Bedford" }),
            e("div", { className: "t3-float t3-float--places" },
              e("b", null, "\u00a3", cfg.price), e("span", null, "usually \u00a3", cfg.wasPrice)),
            e("div", { className: "t3-float t3-float--rev" },
              e("img", { src: "assets/bedford-2.jpg", alt: "" }),
              e("div", null,
                e("div", { className: "st" }, "\u2605\u2605\u2605\u2605\u2605"),
                e("div", { className: "q" }, "\u201CThe team here are great! Very helpful and explain things so simply.\u201D"),
                e("div", { className: "by" }, "Sorrell \u00b7 Google review")))),
          e("div", { className: "t3-hero__pills t3-hero__pills--under" },
            e("span", { className: "t3-pill" }, e(Icon, { name: "calendar" }), "1st \u2013 30th September"),
            e("span", { className: "t3-pill" }, e(Icon, { name: "badge" }), "Exam + 2 small X-rays"),
            e("span", { className: "t3-pill" }, e(Icon, { name: "percent" }), "Save \u00a3", cfg.wasPrice - cfg.price),
            e("span", { className: "t3-pill" }, e(Icon, { name: "card" }), "Free on-site parking")),
          e("ul", { className: "t3-ticks t3-ticks--under" },
            usps.map((tk, i) => e("li", { key: i },
              e("span", { className: "t3-ticks__ic" }, e(Icon, { name: "check" })),
              e("span", null, tk)))))));
  };

  const HeroQuote = () => e("section", { className: "t3-sec t3-cont", style: { paddingTop: 0 } },
    e("div", { className: "t3-hq t3-reveal" },
      e("blockquote", { className: "t3-hq__q" },
        "\u201CKiran really is brilliant at what she does and I have recommended de-ientes to countless friends and family members. If you are looking for a good dentist in Bedford, I would highly recommend going with Kiran, she provides an excellent service.\u201D"),
      e("div", { className: "t3-hq__name" }, "Jazlyn \u00b7 Google review")));

  const Offer = ({ cfg }) => {
    const incl = [
      ["badge", "A full examination", "With one of our Bedford dentists.", "INCLUDED"],
      ["scan", "2 small X-rays", "So nothing is missed above the gumline.", "INCLUDED"],
      ["percent", "Usually \u00a3" + cfg.wasPrice, "Throughout September, just \u00a3" + cfg.price + ", a saving of \u00a3" + (cfg.wasPrice - cfg.price) + ".", "-\u00a3" + (cfg.wasPrice - cfg.price)],
    ];
    return e("section", { className: "t3-sec t3-cont", id: "offer" },
      e("div", { className: "t3-offer__head" },
        e("span", { className: "t3-eyebrow" }, e("span", { className: "dot" }), "The offer"),
        e("h2", { className: "t3-h2" }, "What's included in your ", e("span", { className: "alt" }, "\u00a3" + cfg.price), " visit"),
        e("p", { className: "t3-lead", style: { marginTop: 16 } }, "A proper look, not a rushed one. Your new patient visit includes:")),
      e("div", { className: "t3-offer__grid" },
        e("div", { className: "t3-card t3-reveal" },
          e("ul", { className: "t3-incl" },
            incl.map(([ic, t, s, pr], i) => e("li", { key: i },
              e("span", { className: "ic" }, e(Icon, { name: ic })),
              e("span", { className: "it" }, t, e("small", null, s)),
              e("span", { className: "pr free" }, pr))))),
        e("div", { className: "t3-pricecard t3-reveal" },
          e("img", { className: "t3-pricecard__leaf", src: "assets/de-logo-leaves-nobg.png", alt: "" }),
          e("div", { className: "lbl" }, "Your September price"),
          e("div", { className: "now" }, "\u00a3", cfg.price),
          e("div", { className: "mo" }, "new patient exam and 2 small X-rays"),
          e("div", { className: "save" }, "Usually \u00a3", cfg.wasPrice, " \u2013 a saving of \u00a3", cfg.wasPrice - cfg.price),
          e("div", { className: "fine" }, cfg.runsLine),
          e("div", { className: "t3-pricecard__spacer" }),
          e(Btn, { variant: "gold", block: true, lg: true, href: "#book" }, "Request your appointment"))));
  };

  const Calm = () => e("section", { className: "t3-sec t3-cont" },
    e("div", { className: "t3-ba__grid" },
      e("div", { className: "t3-ba__copy" },
        e("span", { className: "t3-kick" }, "No judgement, ever"),
        e("h2", { className: "t3-h2" }, "A calm, unhurried first visit - ", e("span", { className: "alt" }, "no judgement, ever")),
        e("p", { className: "t3-body", style: { marginTop: 18 } },
          "If it's been a while since your last check-up, you're far from alone, and you won't hear a word about it from us. Small problems are far easier and cheaper to sort out than big ones, which is exactly what your two X-rays are for - they let us see what a visual check alone can't, so nothing gets left to become a bigger job down the line. You'll leave with plain answers, not jargon.")),
      e("div", { className: "t3-baframe" },
        e("img", { src: "assets/bedford-6.jpg", alt: "A dentist talking a patient through their scan at De-ientes Bedford" }))));

  const Flow = () => {
    const steps = [
      ["Get in touch", "Call us or fill in the form, and our Bedford team will call you back to arrange a time that works for you.", ""],
      ["Warm welcome", "Settle in at our Lurke Street practice before you're called through.", ""],
      ["Full examination", "One of our dentists takes proper time over your teeth and gums.", ""],
      ["Two small X-rays", "To build a complete picture, above and below the surface.", ""],
      ["Clear next steps", "Plain-English feedback on what we found, with no pressure to book anything else.", ""],
    ];
    return e("section", { className: "t3-sec t3-cont", id: "day" },
      e("div", { className: "t3-flow__head" },
        e("div", null,
          e("span", { className: "t3-kick" }, "How it works"),
          e("h2", { className: "t3-h2", style: { marginTop: 14 } }, "Your first visit, ", e("span", { className: "alt" }, "step by step"))),
        e("p", { className: "t3-body", style: { maxWidth: 340 } },
          "Nothing complicated - just a few easy steps between you and a proper check-up.")),
      e("div", { className: "t3-flow__grid" },
        steps.map(([t, s], i) => e("div", { className: "t3-step t3-reveal", key: i },
          e("div", { className: "t3-step__n" }, i + 1),
          e("div", { className: "t3-step__t" }, t),
          e("div", { className: "t3-step__s" }, s)))));
  };

  const Find = () => {
    const shots = [
      ["photo-reception.jpg", "Our welcoming reception", ""],
      ["bedford-5.jpg", "Unhurried consultations", "t3-galfig--full"],
      ["bedford-1.jpg", "The Bedford team", "t3-galfig--full"],
      ["bedford-2.jpg", "A community-focused practice", ""],
    ];
    return e("section", { className: "t3-sec t3-cont", id: "find" },
      e("div", { className: "t3-flow__head" },
        e("div", null,
          e("span", { className: "t3-kick" }, "Find us"),
          e("h2", { className: "t3-h2", style: { marginTop: 14 } }, "Right in the heart of ", e("span", { className: "alt" }, "Bedford"))),
        e("p", { className: "t3-body", style: { maxWidth: 400 } },
          "Our Lurke Street practice sits in the centre of town, with parking close by - so you can pop in before work, over lunch, or between errands, without the hassle of hunting for a space.")),
      e("div", { className: "t3-gallery" },
        shots.map(([img, cap, extra], i) => e("figure", { className: "t3-galfig t3-reveal " + extra, key: i },
          e("img", { src: "assets/" + img, alt: cap }),
          e("figcaption", null, cap)))));
  };

  const Why = () => {
    const cards = [
      ["users", "A family-run practice for 25 years", "Now in its third generation."],
      ["heart", "A calm, modern practice", "Designed to put nervous patients at ease."],
      ["shield", "Wheelchair accessible", "With disabled parking and facilities throughout."],
      ["smile", "A community-focused team", "Who get to know you, not just your teeth."],
    ];
    return e("section", { className: "t3-sec t3-cont" },
      e("div", { className: "t3-why__head" },
        e("span", { className: "t3-kick" }, "Why De-ientes"),
        e("h2", { className: "t3-h2", style: { marginTop: 14 } }, "Why Bedford families choose De-ientes")),
      e("div", { className: "t3-why__grid" },
        cards.map(([ic, t, s], i) => e("div", { className: "t3-whycard t3-reveal", key: i },
          e("span", { className: "t3-whycard__ic" }, e(Icon, { name: ic })),
          e("div", { className: "t3-whycard__t" }, t),
          e("div", { className: "t3-whycard__s" }, s)))));
  };

  const Pricing = ({ cfg }) => e("section", { className: "t3-sec t3-cont", id: "pricing" },
    e("div", { className: "t3-fin__card t3-reveal" },
      e("img", { className: "t3-fin__leaf", src: "assets/de-logo-leaves-nobg.png", alt: "" }),
      e("div", { className: "t3-fin__head" },
        e("span", { className: "t3-kick", style: { color: "var(--t3-gold)" } }, "Pricing"),
        e("h2", { className: "t3-h2" }, "Simple, ", e("span", { className: "alt" }, "transparent pricing")),
        e("p", { className: "t3-lead" },
          "\u00a3", cfg.price, " for your new patient exam and 2 small X-rays, throughout September. No hidden extras and no surprise add-ons - just an honest look at your dental health, with any next steps explained clearly and without pressure.")),
      e("div", { className: "t3-fin__grid" },
        [["\u00a3" + cfg.price, "Your September price", "New patient exam and 2 small X-rays."],
         ["\u00a3" + (cfg.wasPrice - cfg.price), "You save", "Usually \u00a3" + cfg.wasPrice + " outside the offer."]].map(([big, t, s], i) =>
          e("div", { className: "t3-fin__stat", key: i },
            e("div", { className: "t3-fin__big" }, big),
            e("div", { className: "t3-fin__t" }, t),
            e("div", { className: "t3-fin__s" }, s)))),
      e("p", { className: "t3-fin__note" }, cfg.runsLine)));

  const Explainer = () => e("section", { className: "t3-sec t3-cont" },
    e("div", { className: "t3-ba__grid" },
      e("div", { className: "t3-baframe" },
        e("img", { src: "assets/bedford-5.jpg", alt: "A dentist explaining an examination to a patient" })),
      e("div", { className: "t3-ba__copy" },
        e("span", { className: "t3-kick" }, "Good to know"),
        e("h2", { className: "t3-h2" }, "What happens at a ", e("span", { className: "alt" }, "new patient exam")),
        e("p", { className: "t3-body", style: { marginTop: 18 } },
          "Your dentist checks your teeth and gums thoroughly, looking for anything that needs attention now or watching in future. Your two small X-rays give a clear view beneath the surface - between teeth and below the gumline - that a visual check alone can't reach, so any early signs of decay or other issues are far less likely to be missed."))));

  const Reviews = () => {
    const reviews = [
      { text: "Kiran really is brilliant at what she does and I have recommended de-ientes to countless friends and family members. If you are looking for a good dentist in Bedford, I would highly recommend going with Kiran, she provides an excellent service. The extent and breadth of her knowledge is really evident and the quality of her work is fab.", name: "Jazlyn" },
      { text: "The team here are great! Very helpful and explain things so simply. Henna and Courtney were great at my last visit, showing empathy and explaining the situation in very simple terms. Suroshen has been great with my son\u2019s treatment, engaging with him directly to explain the treatment. Would recommend this practice!", name: "Sorrell Nighah" },
      { text: "I had my appointment with Dr Saroshen Naidoo today and he was incredibly helpful. He was very understanding, took the time to listen to my concerns, explained all of my options clearly, and gave honest advice that really helped me with my dental problem. I felt listened to, supported, and well cared for throughout. I really appreciate your help today", name: "Aaron Spilling" },
      { text: "10/10 dentist! I had teeth straightening treatment with Saroshen (lingual brace and thereafter clear aligners). My teeth look amazing. So grateful to Saroshen and the team. The reception staff are so friendly also - especially Kiri. Thank you, all!", name: "Katie Jones" },
      { text: "I have been attending De-ientes Bedford Practice for a number of years. The treatment I receive from Dr Saioshen is absolutely first class! He is a dedicated kind and caring professional. I would highly recommend Dr Saioshen and all of the team at De-ientes Bedford.", name: "James Curzon" },
      { text: "I have been a patient at De-ientes Bedford for many years now and the staff are all wonderful, helpful and friendly. The lovely receptionists and the dental nurses always welcome you with a smile. Dr Rahil Naidoo is kind and gentle. He explains everything very clearly and ensures that you are comfortable throughout. Henna, the hygienist, is very thorough, she explains what she is doing and is always smiling. If she feels there is an issue she will take time to advise on techniques or products that can help.", name: "Judith Wong" },
    ];
    return e("section", { className: "t3-sec t3-cont", id: "reviews" },
      e("div", { className: "t3-rev__head" },
        e("div", null,
          e("span", { className: "t3-kick" }, "Loved locally"),
          e("h2", { className: "t3-h2", style: { marginTop: 14 } }, "What Bedford patients ", e("span", { className: "alt" }, "say about us")))),
      e("div", { className: "t3-rev__grid" },
        reviews.map(({ text, name }, i) => e("div", { className: "t3-revcard", key: i },
          e("div", { className: "t3-revcard__st" }, "\u2605\u2605\u2605\u2605\u2605"),
          e("p", { className: "t3-revcard__q" }, "\u201C", text, "\u201D"),
          e("div", { className: "t3-revcard__by" },
            e("div", null,
              e("div", { className: "t3-revcard__n" }, name),
              e("div", { className: "t3-revcard__m" }, "Google review")))))));
  };

  const FAQ = () => {
    const [open, setOpen] = useState(0);
    const items = [
      ["Do I need to already be registered with De-ientes?", "No - this offer is specifically for new patients joining our Bedford practice."],
      ["What if the exam shows I need further treatment?", "We'll talk you through anything we find in plain English, with clear options and no pressure to book anything on the spot."],
      ["Is the \u00a335 offer available all year?", "No - it's available from 1st to 30th September only, and appointments are limited, so it's worth getting in touch early."],
      ["Can I use this offer at another De-ientes practice?", "This offer is exclusive to our Bedford practice on Lurke Street."],
      ["Is the practice wheelchair accessible?", "Yes - we have a wheelchair accessible entrance, seating and toilet, plus disabled parking on site."],
    ];
    return e("section", { className: "t3-sec t3-cont", id: "faq" },
      e("div", { className: "t3-faq__grid" },
        e("div", { className: "t3-faq__head" },
          e("span", { className: "t3-kick" }, "Good to know"),
          e("h2", { className: "t3-h2" }, "Frequently asked ", e("span", { className: "alt" }, "questions"))),
        e("div", { className: "t3-faq__list" },
          items.map(([q, a], i) => e("div", { className: "t3-faq__item", key: i, "data-open": open === i },
            e("button", { className: "t3-faq__q", onClick: () => setOpen(open === i ? -1 : i) },
              e("span", null, q),
              e("span", { className: "t3-faq__ic" }, e(Icon, { name: "plus" }))),
            e("div", { className: "t3-faq__a", style: { maxHeight: open === i ? 320 : 0 } },
              e("div", { className: "t3-faq__a-in" }, a)))))));
  };

  const FinalCTA = ({ cfg }) => e("section", { className: "t3-sec t3-cont" },
    e("div", { className: "t3-final__card t3-ondark" },
      e("img", { className: "t3-final__leaf", src: "assets/de-logo-leaves-nobg.png", alt: "" }),
      e("div", { className: "t3-final__inner" },
        e("span", { className: "t3-eyebrow t3-eyebrow--plain" }, "New patients welcome"),
        e("h2", { className: "t3-display" }, "Book your September ", e("span", { className: "alt" }, "new patient offer"), " today"),
        e("p", { className: "t3-lead", style: { maxWidth: 660, margin: "22px auto 28px" } },
          "\u00a3", cfg.price, " for your new patient exam and 2 small X-rays - available 1st to 30th September only at our Bedford practice."),
        e("div", { className: "t3-final__actions" },
          e(Btn, { variant: "gold", lg: true, href: "#book" }, "Request your appointment"),
          e(Btn, { variant: "light", lg: true, href: "tel:" + cfg.phone }, "Call us on " + cfg.phone)),
        e("p", { className: "t3-final__fine" }, "De-ientes ", cfg.location, " \u00b7 ", cfg.address))));

  const Footer = ({ cfg }) => e("footer", { className: "t3-footer" },
    e("div", { className: "t3-footer__card" },
      e("div", { className: "t3-footer__top" },
        e("div", null,
          e("div", { className: "t3-footer__brand" },
            e("img", { className: "t3-footer__logo", src: "assets/de-logo-full.png", alt: cfg.practice })),
          e("p", { style: { maxWidth: 340 } },
            "A family-run practice caring for Bedford families for 25 years, now in its third generation."),
          e("div", { className: "t3-footer__badges" },
            ["GDC Registered", "CQC Regulated", "Wheelchair accessible"].map((b, i) =>
              e("span", { className: "t3-footer__badge", key: i }, b)))),
        e("div", null,
          e("h4", null, "Visit us"),
          e("p", { style: { fontWeight: 600, color: "var(--t3-ink)" } }, "De-ientes ", cfg.location),
          e("p", null, cfg.address),
          e("p", { style: { marginTop: 10 } }, e("a", { href: "tel:" + cfg.phone }, cfg.phone))),
        e("div", null,
          e("h4", null, "The offer"),
          e("ul", null,
            NAV.concat([["Request your appointment", "#book"]]).map(([l, href], i) =>
              e("li", { key: i }, e("a", { href }, l)))))),
      e("div", { className: "t3-footer__bar" },
        e("span", null, "\u00A9 ", new Date().getFullYear(), " ", cfg.practice, ". All rights reserved."),
        e("span", null, "Offer available 1st to 30th September only, at our Bedford practice. Appointments are limited."))));

  const StickyCTA = ({ cfg }) => {
    const [show, setShow] = useState(false);
    useEffect(() => {
      const onScroll = () => setShow(window.scrollY > 520);
      window.addEventListener("scroll", onScroll, { passive: true });
      onScroll();
      return () => window.removeEventListener("scroll", onScroll);
    }, []);
    return e("div", { className: "t3-stickycta" + (show ? " is-on" : ""), "aria-hidden": !show },
      e("a", { className: "t3-stickycta__call", href: "tel:" + cfg.phone, "aria-label": "Call us" },
        e(Icon, { name: "phone" }), e("span", null, "Call")),
      e("a", { className: "t3-stickycta__book", href: "#book" }, "Request appointment"));
  };

  window.SO = { Nav, Hero, HeroQuote, Offer, Calm, Flow, Find, Why, Pricing, Explainer, Reviews, FAQ, FinalCTA, Footer, StickyCTA };
})();
