import { h as Link } from "../_libs/@tanstack/react-router+[...].mjs";
import { y as require_jsx_runtime } from "../_libs/@radix-ui/react-accordion+[...].mjs";
import { o as formatDuration, s as formatPrice, t as Button } from "./button-BJ7sUxAL.mjs";
import { r as useSuspenseQuery } from "../_libs/tanstack__react-query.mjs";
import { i as SiteLayout, r as PageHeader } from "./SiteLayout-BB0n_2xh.mjs";
import { t as servicesQO } from "./cenovnik-D5mYQuyi.mjs";
//#region node_modules/.nitro/vite/services/ssr/assets/cenovnik-W20PbWUk.js
var import_jsx_runtime = require_jsx_runtime();
function CenovnikPage() {
	const { data } = useSuspenseQuery(servicesQO);
	return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SiteLayout, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageHeader, {
		title: "Cenovnik",
		intro: "Cene i trajanja za sve naše usluge. Klikni „Zakaži“ pored usluge da direktno pokreneš zakazivanje."
	}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
		className: "mx-auto max-w-4xl px-4 py-10 space-y-10",
		children: [
			"Manikir",
			"Pedikir",
			"ORLY",
			"Depilacija"
		].map((cat) => {
			const items = data.filter((s) => s.category === cat);
			if (items.length === 0) return null;
			return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
				className: "text-2xl md:text-3xl mb-4",
				children: cat
			}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
				className: "overflow-hidden rounded-2xl border border-border/60 bg-card",
				children: items.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
					className: "grid gap-3 p-4 md:grid-cols-[1fr_auto_auto_auto] md:items-center " + (i > 0 ? "border-t border-border/60" : ""),
					children: [
						/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
							className: "min-w-0",
							children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
								className: "font-medium truncate",
								children: s.name
							}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
								className: "text-xs text-muted-foreground",
								children: s.providers?.name
							})]
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
							className: "text-sm text-muted-foreground md:min-w-[140px]",
							children: formatDuration(s.duration_minutes)
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
							className: "text-sm font-semibold md:min-w-[110px] md:text-right",
							children: formatPrice(s.price != null ? Number(s.price) : null)
						}),
						/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
							asChild: true,
							size: "sm",
							variant: "outline",
							children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
								to: "/zakazivanje",
								children: "Zakaži"
							})
						})
					]
				}, s.id))
			})] }, cat);
		})
	})] });
}
//#endregion
export { CenovnikPage as component };
