import { h as Link } from "../_libs/@tanstack/react-router+[...].mjs";
import { y as require_jsx_runtime } from "../_libs/@radix-ui/react-accordion+[...].mjs";
import { i as SiteLayout, r as PageHeader } from "./SiteLayout-BB0n_2xh.mjs";
import { t as Route } from "./blog._slug-CXciv5qc.mjs";
//#region node_modules/.nitro/vite/services/ssr/assets/blog._slug-lymbEaev.js
var import_jsx_runtime = require_jsx_runtime();
function BlogPost() {
	const p = Route.useLoaderData();
	const blocks = p.body.split(/\n\n+/).map((s) => s.trim()).filter(Boolean);
	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SiteLayout, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeader, {
		title: p.title,
		intro: p.excerpt
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", {
		className: "mx-auto max-w-2xl px-4 py-10 prose prose-neutral",
		children: [
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
				className: "text-sm text-muted-foreground",
				children: new Date(p.date).toLocaleDateString("sr-Latn-RS")
			}),
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
				className: "mt-6 space-y-4",
				children: blocks.map((b, i) => b.startsWith("## ") ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
					className: "pt-4 text-2xl",
					children: b.slice(3)
				}, i) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
					className: "text-lg leading-relaxed text-foreground",
					children: b
				}, i))
			}),
			/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
				className: "mt-10 rounded-2xl bg-secondary/40 p-6 text-center",
				children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
					className: "text-lg",
					children: "Spremni za termin u našem salonu u Novom Sadu?"
				}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
					to: "/zakazivanje",
					className: "mt-3 inline-flex items-center justify-center rounded-md bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",
					children: "Zakaži termin online"
				})]
			}),
			/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
				className: "mt-10",
				children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
					to: "/blog",
					className: "text-primary hover:underline",
					children: "← Nazad na blog"
				})
			})
		]
	})] });
}
//#endregion
export { BlogPost as component };
