import { jsxs, jsx } from "react/jsx-runtime";
import { c as Route, d as q } from "./router-Dahr8H-r.js";
import { useSuspenseQuery } from "@tanstack/react-query";
import { L as LeadForm } from "./lead-form-Bx9NEbTG.js";
import { b as blogImage } from "./project-images-BkjwhtiA.js";
import "@tanstack/react-router";
import "react";
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";
function PostPage() {
  const {
    slug
  } = Route.useParams();
  const {
    data: b
  } = useSuspenseQuery(q(slug));
  return /* @__PURE__ */ jsxs("article", { className: "mx-auto max-w-4xl px-6 py-16", children: [
    /* @__PURE__ */ jsx("p", { className: "text-[10px] font-bold uppercase tracking-widest text-gold", children: b.category }),
    /* @__PURE__ */ jsx("h1", { className: "mt-3 font-display text-3xl font-bold md:text-5xl", children: b.title }),
    /* @__PURE__ */ jsx("p", { className: "mt-4 text-navy/60", children: new Date(b.published_at).toLocaleDateString("en-GB", {
      day: "numeric",
      month: "long",
      year: "numeric"
    }) }),
    /* @__PURE__ */ jsx("div", { className: "my-10 aspect-[16/9] overflow-hidden bg-navy/5", children: /* @__PURE__ */ jsx("img", { src: blogImage(b.slug, b.cover_image), alt: b.title, width: 1600, height: 900, className: "size-full object-cover" }) }),
    /* @__PURE__ */ jsx("div", { className: "prose prose-lg max-w-none whitespace-pre-wrap text-navy/80", children: b.content }),
    /* @__PURE__ */ jsxs("div", { className: "mt-16 bg-white p-8 ring-1 ring-navy/5", children: [
      /* @__PURE__ */ jsx("p", { className: "mb-4 font-display text-lg font-bold", children: "Ready to explore Dubai properties?" }),
      /* @__PURE__ */ jsx(LeadForm, { sourcePage: `/blog/${b.slug}`, variant: "compact" })
    ] })
  ] });
}
export {
  PostPage as component
};
