import { jsxs, jsx, Fragment } from "react/jsx-runtime";
import { h as homeData } from "./router-Dahr8H-r.js";
import { Link } from "@tanstack/react-router";
import { useSuspenseQuery } from "@tanstack/react-query";
import { L as LeadForm } from "./lead-form-Bx9NEbTG.js";
import { P as ProjectCard } from "./project-card-CSd7IkOX.js";
import { useState, useEffect } from "react";
import { b as blogImage } from "./project-images-BkjwhtiA.js";
import "sonner";
import "lucide-react";
import "./client-P40JY-SL.js";
import "@supabase/supabase-js";
import "./server-CWcU6oWp.js";
import "node:async_hooks";
import "h3-v2";
import "@tanstack/router-core";
import "seroval";
import "@tanstack/history";
import "@tanstack/router-core/ssr/client";
import "@tanstack/router-core/ssr/server";
import "@tanstack/react-router/ssr/server";
import "zod";
import "@radix-ui/react-dialog";
import "clsx";
import "tailwind-merge";
const s1 = "/assets/hero-slide-1-D5cPzURX.jpg";
const s2 = "/assets/hero-slide-2-CqcaGZDr.jpg";
const s3 = "/assets/hero-slide-3-DeF-vPlX.jpg";
const s4 = "/assets/hero-slide-4-C_ORe_RJ.jpg";
const s5 = "/assets/hero-slide-5-BdNC1Jlq.jpg";
const SLIDES = [
  { src: s1, title: "Signature Villas", caption: "Sunset-facing waterfront residences" },
  { src: s2, title: "Curated Townhouses", caption: "Family communities across Dubai" },
  { src: s3, title: "Skyline Living", caption: "Steps from Downtown & Burj Khalifa" },
  { src: s4, title: "Grand Mansions", caption: "Architectural statement homes" },
  { src: s5, title: "Marina Estates", caption: "Private moorings & yacht access" }
];
function HeroSlider() {
  const [i, setI] = useState(0);
  useEffect(() => {
    const t = setInterval(() => setI((p) => (p + 1) % SLIDES.length), 5e3);
    return () => clearInterval(t);
  }, []);
  return /* @__PURE__ */ jsxs("div", { className: "relative size-full min-h-[400px] overflow-hidden bg-navy", children: [
    SLIDES.map((s, idx) => /* @__PURE__ */ jsx(
      "img",
      {
        src: s.src,
        alt: s.title,
        width: 1920,
        height: 1280,
        loading: idx === 0 ? "eager" : "lazy",
        fetchPriority: idx === 0 ? "high" : "auto",
        className: `absolute inset-0 size-full object-cover transition-opacity duration-1000 ${idx === i ? "opacity-100" : "opacity-0"}`
      },
      s.src
    )),
    /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-navy/70 via-navy/10 to-transparent" }),
    /* @__PURE__ */ jsxs("div", { className: "absolute inset-x-0 bottom-0 p-6 sm:p-10", children: [
      /* @__PURE__ */ jsxs("div", { className: "mb-5 max-w-md text-white", children: [
        /* @__PURE__ */ jsx("p", { className: "text-[10px] font-bold uppercase tracking-[0.25em] text-gold", children: SLIDES[i].caption }),
        /* @__PURE__ */ jsx("h2", { className: "mt-2 font-display text-2xl font-bold sm:text-3xl", children: SLIDES[i].title })
      ] }),
      /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: SLIDES.map((_, idx) => /* @__PURE__ */ jsx(
        "button",
        {
          type: "button",
          "aria-label": `Go to slide ${idx + 1}`,
          onClick: () => setI(idx),
          className: `h-[3px] transition-all ${idx === i ? "w-10 bg-gold" : "w-5 bg-white/40 hover:bg-white/70"}`
        },
        idx
      )) })
    ] })
  ] });
}
function HomePage() {
  const {
    data
  } = useSuspenseQuery(homeData);
  return /* @__PURE__ */ jsxs(Fragment, { children: [
    /* @__PURE__ */ jsxs("section", { className: "relative grid min-h-[90vh] items-stretch lg:grid-cols-[1fr_440px]", children: [
      /* @__PURE__ */ jsx("div", { className: "relative order-2 min-h-[360px] lg:order-1", children: /* @__PURE__ */ jsx(HeroSlider, {}) }),
      /* @__PURE__ */ jsxs("div", { className: "order-1 flex flex-col justify-center bg-ivory p-6 sm:p-10 lg:order-2 lg:p-12 animate-fade-in-up", children: [
        /* @__PURE__ */ jsx("span", { className: "eyebrow mb-3 block", children: "Curated Dubai Real Estate" }),
        /* @__PURE__ */ jsxs("h1", { className: "mb-5 font-display text-3xl font-extrabold leading-[0.95] tracking-tighter text-balance sm:text-4xl lg:text-5xl", children: [
          "Premium ",
          /* @__PURE__ */ jsx("span", { className: "text-gold", children: "Townhouses" }),
          " & Villas in Dubai"
        ] }),
        /* @__PURE__ */ jsx("p", { className: "mb-6 max-w-[42ch] text-sm leading-relaxed text-navy/70", children: "Hand-selected off-plan and ready opportunities for families, investors, and long-term value." }),
        /* @__PURE__ */ jsxs("div", { className: "bg-white p-5 shadow-[var(--shadow-card)] ring-1 ring-navy/5 sm:p-6", children: [
          /* @__PURE__ */ jsx("p", { className: "mb-3 font-display text-base font-bold sm:text-lg", children: "Register your interest" }),
          /* @__PURE__ */ jsx(LeadForm, { sourcePage: "/", variant: "compact" })
        ] }),
        /* @__PURE__ */ jsxs("div", { className: "mt-6 flex flex-wrap gap-3", children: [
          /* @__PURE__ */ jsx(Link, { to: "/projects", className: "bg-navy px-5 py-3 text-[10px] font-bold uppercase tracking-widest text-ivory hover:bg-gold hover:text-navy", children: "View Projects" }),
          /* @__PURE__ */ jsx(Link, { to: "/contact", className: "border border-navy/20 px-5 py-3 text-[10px] font-bold uppercase tracking-widest text-navy hover:bg-navy hover:text-ivory", children: "Speak To An Advisor" })
        ] })
      ] })
    ] }),
    /* @__PURE__ */ jsx("section", { className: "px-6 py-24", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-7xl", children: [
      /* @__PURE__ */ jsxs("div", { className: "mb-12 flex flex-wrap items-end justify-between gap-6", children: [
        /* @__PURE__ */ jsxs("div", { children: [
          /* @__PURE__ */ jsx("span", { className: "eyebrow italic", children: "Curated Selection" }),
          /* @__PURE__ */ jsx("h2", { className: "mt-3 font-display text-3xl font-bold tracking-tight md:text-4xl", children: "Featured Communities" })
        ] }),
        /* @__PURE__ */ jsx(Link, { to: "/projects", className: "border-b border-gold text-[10px] font-bold uppercase tracking-widest", children: "View All Portfolio" })
      ] }),
      /* @__PURE__ */ jsx("div", { className: "grid gap-8 sm:grid-cols-2 lg:grid-cols-3", children: data.projects.map((p) => /* @__PURE__ */ jsx(ProjectCard, { p }, p.slug)) })
    ] }) }),
    /* @__PURE__ */ jsx("section", { className: "bg-navy px-6 py-20 text-ivory", children: /* @__PURE__ */ jsx("div", { className: "mx-auto grid max-w-7xl gap-12 text-center md:grid-cols-4", children: [["8.2%", "Average Gross Yield"], ["0%", "Tax on Property Income"], ["$12B+", "Real Estate Inflow 2024"], ["10Y", "Golden Visa Eligibility"]].map(([v, l]) => /* @__PURE__ */ jsxs("div", { children: [
      /* @__PURE__ */ jsx("div", { className: "mb-2 font-display text-5xl font-extrabold text-gold", children: v }),
      /* @__PURE__ */ jsx("div", { className: "text-[10px] uppercase tracking-widest text-white/50", children: l })
    ] }, l)) }) }),
    /* @__PURE__ */ jsx("section", { className: "px-6 py-24", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto grid max-w-7xl gap-12 md:grid-cols-2", children: [
      /* @__PURE__ */ jsxs("div", { children: [
        /* @__PURE__ */ jsx("span", { className: "eyebrow", children: "Why Bridgefield" }),
        /* @__PURE__ */ jsx("h2", { className: "mt-3 font-display text-3xl font-bold tracking-tight md:text-4xl", children: "A trusted advisor for buyers who value clarity, access, and follow-through." })
      ] }),
      /* @__PURE__ */ jsx("div", { className: "space-y-6", children: [["Curated, not catalogued.", "Every project we present is hand-selected on yield, location, and developer track record."], ["Local intelligence.", "Our team lives the Dubai market daily, with priority access to launches and unlisted inventory."], ["End-to-end support.", "From shortlist to handover and beyond — we stay involved long after the SPA is signed."]].map(([h, p]) => /* @__PURE__ */ jsxs("div", { className: "border-l-2 border-gold pl-5", children: [
        /* @__PURE__ */ jsx("h3", { className: "mb-1 font-display text-base font-bold", children: h }),
        /* @__PURE__ */ jsx("p", { className: "text-sm text-navy/70", children: p })
      ] }, h)) })
    ] }) }),
    /* @__PURE__ */ jsx("section", { className: "bg-ivory/60 px-6 py-24", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-6xl", children: [
      /* @__PURE__ */ jsx("h2", { className: "mb-16 text-center font-display text-3xl font-bold", children: "The Path to Ownership" }),
      /* @__PURE__ */ jsx("div", { className: "grid gap-8 md:grid-cols-5", children: [["01", "Consultation", "We understand your goals — investment, family home, or both."], ["02", "Shortlisting", "A curated set of communities aligned to your brief."], ["03", "Viewing", "Physical or virtual tours of every shortlisted unit."], ["04", "Booking", "Reservation, documentation, and payment-plan setup."], ["05", "Handover", "Title-deed support and post-handover advisory."]].map(([n, h, p]) => /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
        /* @__PURE__ */ jsx("div", { className: "font-display text-xl font-extrabold text-gold", children: n }),
        /* @__PURE__ */ jsx("h4", { className: "text-xs font-bold uppercase tracking-wider", children: h }),
        /* @__PURE__ */ jsx("p", { className: "text-[11px] leading-relaxed text-navy/60", children: p })
      ] }, n)) })
    ] }) }),
    /* @__PURE__ */ jsx("section", { className: "bg-navy-light px-6 py-24 text-center text-white", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-3xl", children: [
      /* @__PURE__ */ jsxs("div", { className: "mb-8 flex justify-center gap-1", children: [
        /* @__PURE__ */ jsx("div", { className: "size-1 rounded-full bg-gold" }),
        /* @__PURE__ */ jsx("div", { className: "size-1 rounded-full bg-gold" }),
        /* @__PURE__ */ jsx("div", { className: "size-1 rounded-full bg-gold" })
      ] }),
      /* @__PURE__ */ jsx("blockquote", { className: "mb-8 font-display text-2xl leading-snug md:text-3xl", children: '"Bridgefield redefined our perception of Dubai real estate. Their analytical approach to townhouse selection provided a yield 15% higher than our London holdings."' }),
      /* @__PURE__ */ jsx("cite", { className: "text-[10px] font-bold uppercase tracking-[0.2em] not-italic text-gold", children: "Director, Henley-Vance Group" })
    ] }) }),
    /* @__PURE__ */ jsx("section", { className: "px-6 py-24", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-7xl", children: [
      /* @__PURE__ */ jsxs("div", { className: "mb-12 flex flex-wrap items-center justify-between gap-4", children: [
        /* @__PURE__ */ jsx("h2", { className: "font-display text-3xl font-bold", children: "Market Insights" }),
        /* @__PURE__ */ jsx(Link, { to: "/blog", className: "border border-navy/10 px-6 py-2 text-[10px] font-bold uppercase tracking-widest hover:bg-navy hover:text-ivory", children: "Read All" })
      ] }),
      /* @__PURE__ */ jsx("div", { className: "grid gap-12 md:grid-cols-2", children: data.blogs.map((b) => /* @__PURE__ */ jsxs(Link, { to: "/blog/$slug", params: {
        slug: b.slug
      }, className: "group flex gap-6", children: [
        /* @__PURE__ */ jsx("div", { className: "size-32 shrink-0 overflow-hidden bg-navy/5", children: /* @__PURE__ */ jsx("img", { src: blogImage(b.slug, b.cover_image), alt: b.title, loading: "lazy", width: 400, height: 400, className: "size-full object-cover transition-transform group-hover:scale-105" }) }),
        /* @__PURE__ */ jsxs("div", { children: [
          /* @__PURE__ */ jsx("p", { className: "mb-2 text-[10px] font-bold uppercase text-gold", children: b.category }),
          /* @__PURE__ */ jsx("h4", { className: "mb-2 font-bold transition-colors group-hover:text-gold", children: b.title }),
          /* @__PURE__ */ jsx("p", { className: "text-xs text-navy/50", children: b.excerpt })
        ] })
      ] }, b.slug)) })
    ] }) }),
    /* @__PURE__ */ jsx("section", { className: "bg-navy px-6 py-24 text-ivory", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto grid max-w-6xl gap-12 md:grid-cols-2 md:items-center", children: [
      /* @__PURE__ */ jsxs("div", { children: [
        /* @__PURE__ */ jsx("span", { className: "eyebrow", children: "Begin the Conversation" }),
        /* @__PURE__ */ jsx("h2", { className: "mt-3 font-display text-3xl font-bold md:text-4xl", children: "Speak with a senior Dubai property advisor today." }),
        /* @__PURE__ */ jsx("p", { className: "mt-4 max-w-md text-sm text-ivory/70", children: "Share what you're looking for. We'll respond with a shortlist of communities matched to your brief — usually within 24 hours." })
      ] }),
      /* @__PURE__ */ jsx("div", { className: "bg-white p-8 text-navy", children: /* @__PURE__ */ jsx(LeadForm, { sourcePage: "/#final", variant: "compact", ctaLabel: "Request a Shortlist" }) })
    ] }) })
  ] });
}
export {
  HomePage as component
};
