import { t as require_jsx_runtime } from "../index.js";
import { t as Link } from "./link-CBS2KtPf.js";
import { a as waLink, t as CLINIC } from "./clinic-CiEEmMP0.js";
import { t as useSearchParams } from "./navigation-Cv-VgJ19.js";
//#region app/thank-you/page.tsx
var import_jsx_runtime = require_jsx_runtime();
function Thanks() {
	const q = useSearchParams();
	const ref = q.get("ref") || "LD-PENDING";
	const date = q.get("date") || "To be confirmed", time = q.get("time") || "", treatment = q.get("treatment") || "Consultation", name = q.get("name") || "Patient";
	const g = `https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(`Dental appointment — ${treatment}`)}&dates=${date.replace(/-/g, "")}T${time.replace(":", "")}00/${date.replace(/-/g, "")}T${time.replace(":", "")}00&details=${encodeURIComponent(`Booking reference ${ref}`)}`;
	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("main", {
		className: "thanks",
		children: [
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
				className: "brand-mark",
				children: "L"
			}),
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { children: "BOOKING REQUEST RECEIVED" }),
			/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("h1", { children: [
				"Thank you, ",
				name,
				"."
			] }),
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "Our team will call or WhatsApp you shortly to confirm your appointment." }),
			/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { children: [
				/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: ["Reference", /* @__PURE__ */ (0, import_jsx_runtime.jsx)("b", { children: ref })] }),
				/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: ["Treatment", /* @__PURE__ */ (0, import_jsx_runtime.jsx)("b", { children: treatment })] }),
				/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: ["Requested time", /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("b", { children: [
					date,
					" · ",
					time
				] })] }),
				/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: ["Clinic", /* @__PURE__ */ (0, import_jsx_runtime.jsx)("b", { children: CLINIC.address })] })
			] }),
			/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
					href: g,
					target: "_blank",
					rel: "noreferrer",
					children: "Add to Google Calendar"
				}),
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
					href: waLink(`Hello Luméa Dental, please confirm my booking ${ref} for ${treatment} on ${date} at ${time}.`),
					children: "Confirm on WhatsApp"
				}),
				/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
					onClick: () => print(),
					children: "Print summary"
				})
			] }),
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
				href: "/",
				children: "Return home"
			})
		]
	});
}
//#endregion
export { Thanks as default };
