import { t as AdminLayout_default } from "./AdminLayout-CFTJa237.js";
import { Head, router, useForm } from "@inertiajs/vue3";
import { Fragment, computed, createBlock, createCommentVNode, createTextVNode, createVNode, defineComponent, openBlock, ref, renderList, resolveComponent, toDisplayString, unref, useSSRContext, vModelSelect, vModelText, watch, withCtx, withDirectives, withModifiers } from "vue";
import { ssrIncludeBooleanAttr, ssrInterpolate, ssrLooseContain, ssrLooseEqual, ssrRenderAttr, ssrRenderClass, ssrRenderComponent, ssrRenderList } from "vue/server-renderer";
import { Calendar, Clock, Edit2, Plus, Store, Trash2, Users, X } from "lucide-vue-next";
//#region resources/js/Pages/CafePOS/Reservations/Index.vue?vue&type=script&setup=true&lang.ts
var Index_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
	__name: "Index",
	__ssrInlineRender: true,
	props: {
		reservations: {},
		outlets: {},
		customers: {},
		tables: {},
		filters: {}
	},
	setup(__props) {
		const props = __props;
		const selectedOutletId = ref(props.filters.outlet_id || (props.outlets[0] ? String(props.outlets[0].id) : ""));
		watch(selectedOutletId, (newVal) => {
			router.get(route("reservations.index"), { outlet_id: newVal }, {
				preserveState: true,
				replace: true
			});
		});
		const isFormModalOpen = ref(false);
		const editingReservation = ref(null);
		const form = useForm({
			customer_id: "",
			table_id: "",
			outlet_id: selectedOutletId.value ? Number(selectedOutletId.value) : 0,
			reservation_date: "",
			reservation_time: "",
			status: "pending"
		});
		const formFilteredTables = computed(() => {
			return props.tables.filter((t) => t.outlet_id === Number(form.outlet_id));
		});
		const openCreateModal = () => {
			editingReservation.value = null;
			form.clearErrors();
			form.reset();
			form.outlet_id = selectedOutletId.value ? Number(selectedOutletId.value) : 0;
			isFormModalOpen.value = true;
		};
		const openEditModal = (res) => {
			editingReservation.value = res;
			form.clearErrors();
			form.customer_id = String(res.customer_id);
			form.outlet_id = res.outlet_id;
			form.table_id = String(res.table_id);
			form.reservation_date = res.reservation_date;
			form.reservation_time = res.reservation_time.slice(0, 5);
			form.status = res.status;
			isFormModalOpen.value = true;
		};
		const submitForm = () => {
			if (editingReservation.value) form.put(route("reservations.update", editingReservation.value.id), { onSuccess: () => {
				isFormModalOpen.value = false;
				form.reset();
			} });
			else form.post(route("reservations.store"), { onSuccess: () => {
				isFormModalOpen.value = false;
				form.reset();
			} });
		};
		const deleteReservation = (res) => {
			if (confirm("Apakah Anda yakin ingin menghapus reservasi ini?")) router.delete(route("reservations.destroy", res.id));
		};
		const getStatusBadge = (status) => {
			switch (status) {
				case "pending": return "bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/20";
				case "confirmed": return "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/20";
				case "cancelled": return "bg-rose-500/10 text-rose-600 dark:text-rose-400 border-rose-500/20";
				default: return "bg-slate-500/10 text-slate-600 dark:text-slate-400 border-slate-500/20";
			}
		};
		return (_ctx, _push, _parent, _attrs) => {
			const _component_Link = resolveComponent("Link");
			_push(`<!--[-->`);
			_push(ssrRenderComponent(unref(Head), { title: "Reservasi Meja" }, null, _parent));
			_push(ssrRenderComponent(AdminLayout_default, null, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) {
						_push(`<div class="space-y-6"${_scopeId}><div class="flex flex-col sm:flex-row sm:items-center justify-between gap-4"${_scopeId}><div${_scopeId}><h1 class="text-2xl font-extrabold text-slate-900 dark:text-slate-50 tracking-tight"${_scopeId}> Reservasi Meja </h1><p class="text-sm text-slate-500 dark:text-slate-400 mt-1"${_scopeId}> Catat dan kelola pesanan meja dari pelanggan untuk waktu tertentu. </p></div><button class="flex items-center justify-center gap-2 px-4 py-2 bg-[#8c5a3c] hover:bg-[#734a31] text-white text-sm font-bold rounded-xl transition-all cursor-pointer shadow-lg shadow-[#8c5a3c]/10"${_scopeId}>`);
						_push(ssrRenderComponent(unref(Plus), { class: "h-4 w-4" }, null, _parent, _scopeId));
						_push(` Buat Reservasi </button></div><div class="flex flex-wrap items-center justify-between gap-4 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl px-5 py-4 shadow-sm"${_scopeId}><div class="flex items-center gap-3"${_scopeId}>`);
						_push(ssrRenderComponent(unref(Store), { class: "h-5 w-5 text-slate-400" }, null, _parent, _scopeId));
						_push(`<span class="text-xs font-bold text-slate-500 uppercase tracking-wide"${_scopeId}>Cabang Outlet:</span><select class="h-9 px-3 border border-slate-200 dark:border-slate-700 rounded-lg bg-slate-50 dark:bg-slate-800 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-[#8c5a3c]/20 text-slate-900 dark:text-slate-100 cursor-pointer"${_scopeId}><!--[-->`);
						ssrRenderList(__props.outlets, (ot) => {
							_push(`<option${ssrRenderAttr("value", String(ot.id))}${ssrIncludeBooleanAttr(Array.isArray(selectedOutletId.value) ? ssrLooseContain(selectedOutletId.value, String(ot.id)) : ssrLooseEqual(selectedOutletId.value, String(ot.id))) ? " selected" : ""}${_scopeId}>${ssrInterpolate(ot.name)}</option>`);
						});
						_push(`<!--]--></select></div></div>`);
						if (__props.reservations.data.length > 0) {
							_push(`<div class="bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-sm overflow-hidden"${_scopeId}><div class="overflow-x-auto"${_scopeId}><table class="w-full text-left border-collapse"${_scopeId}><thead${_scopeId}><tr class="border-b border-slate-100 dark:border-slate-800 bg-slate-50/50 dark:bg-slate-900/50"${_scopeId}><th class="px-6 py-3.5 text-[11px] font-bold text-slate-400 uppercase tracking-wider"${_scopeId}>Pelanggan</th><th class="px-6 py-3.5 text-[11px] font-bold text-slate-400 uppercase tracking-wider"${_scopeId}>Meja</th><th class="px-6 py-3.5 text-[11px] font-bold text-slate-400 uppercase tracking-wider"${_scopeId}>Cabang</th><th class="px-6 py-3.5 text-[11px] font-bold text-slate-400 uppercase tracking-wider"${_scopeId}>Waktu Pemesanan</th><th class="px-6 py-3.5 text-[11px] font-bold text-slate-400 uppercase tracking-wider"${_scopeId}>Status</th><th class="px-6 py-3.5 text-[11px] font-bold text-slate-400 uppercase tracking-wider text-right"${_scopeId}>Aksi</th></tr></thead><tbody class="divide-y divide-slate-100 dark:divide-slate-800"${_scopeId}><!--[-->`);
							ssrRenderList(__props.reservations.data, (res) => {
								_push(`<tr class="hover:bg-slate-50/30 dark:hover:bg-slate-800/10"${_scopeId}><td class="px-6 py-4"${_scopeId}><div class="flex items-center gap-2"${_scopeId}>`);
								_push(ssrRenderComponent(unref(Users), { class: "h-4 w-4 text-[#8c5a3c]" }, null, _parent, _scopeId));
								_push(`<span class="font-extrabold text-xs text-slate-850 dark:text-slate-100"${_scopeId}>${ssrInterpolate(res.customer?.name)}</span></div></td><td class="px-6 py-4"${_scopeId}><span class="font-bold text-xs text-slate-700 dark:text-slate-350"${_scopeId}>${ssrInterpolate(res.table?.number)}</span></td><td class="px-6 py-4 text-xs text-slate-500"${_scopeId}>${ssrInterpolate(res.outlet?.name)}</td><td class="px-6 py-4"${_scopeId}><div class="flex flex-col gap-0.5 text-xs text-slate-655 dark:text-slate-300"${_scopeId}><span class="font-semibold flex items-center gap-1.5"${_scopeId}>`);
								_push(ssrRenderComponent(unref(Calendar), { class: "h-3.5 w-3.5 text-slate-400" }, null, _parent, _scopeId));
								_push(` ${ssrInterpolate(new Date(res.reservation_date).toLocaleDateString("id-ID", { dateStyle: "medium" }))}</span><span class="text-[10px] text-slate-400 flex items-center gap-1.5"${_scopeId}>`);
								_push(ssrRenderComponent(unref(Clock), { class: "h-3.5 w-3.5 text-slate-400" }, null, _parent, _scopeId));
								_push(` ${ssrInterpolate(res.reservation_time.slice(0, 5))}</span></div></td><td class="px-6 py-4"${_scopeId}><span class="${ssrRenderClass(["px-2.5 py-0.5 border rounded-full text-[9px] font-extrabold uppercase tracking-wider", getStatusBadge(res.status)])}"${_scopeId}>${ssrInterpolate(res.status)}</span></td><td class="px-6 py-4 text-right"${_scopeId}><div class="flex items-center justify-end gap-2"${_scopeId}><button class="p-1.5 hover:bg-slate-100 dark:hover:bg-slate-800 text-slate-500 hover:text-slate-800 dark:hover:text-slate-200 rounded-lg cursor-pointer"${_scopeId}>`);
								_push(ssrRenderComponent(unref(Edit2), { class: "h-3.5 w-3.5" }, null, _parent, _scopeId));
								_push(`</button><button class="p-1.5 hover:bg-slate-100 dark:hover:bg-slate-800 text-slate-555 hover:text-rose-600 rounded-lg cursor-pointer"${_scopeId}>`);
								_push(ssrRenderComponent(unref(Trash2), { class: "h-3.5 w-3.5" }, null, _parent, _scopeId));
								_push(`</button></div></td></tr>`);
							});
							_push(`<!--]--></tbody></table></div>`);
							if (__props.reservations.last_page > 1) {
								_push(`<div class="px-6 py-4 border-t border-slate-100 dark:border-slate-800 flex items-center justify-between gap-4"${_scopeId}><span class="text-xs text-slate-500"${_scopeId}>Total ${ssrInterpolate(__props.reservations.total)} reservasi</span><div class="flex items-center gap-2"${_scopeId}><!--[-->`);
								ssrRenderList(__props.reservations.links, (link) => {
									_push(ssrRenderComponent(_component_Link, {
										key: link.label,
										href: link.url || "#",
										class: [
											"px-3 py-1.5 border rounded-lg text-xs font-semibold cursor-pointer",
											link.active ? "bg-[#8c5a3c] text-white border-[#8c5a3c]" : "border-slate-200 dark:border-slate-800 hover:bg-slate-50 dark:hover:bg-slate-800 text-slate-700 dark:text-slate-350",
											!link.url ? "opacity-50 pointer-events-none" : ""
										]
									}, null, _parent, _scopeId));
								});
								_push(`<!--]--></div></div>`);
							} else _push(`<!---->`);
							_push(`</div>`);
						} else {
							_push(`<div class="text-center py-16 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-sm"${_scopeId}>`);
							_push(ssrRenderComponent(unref(Calendar), { class: "h-10 w-10 text-slate-350 dark:text-slate-655 mx-auto mb-3" }, null, _parent, _scopeId));
							_push(`<h3 class="text-sm font-bold text-slate-800 dark:text-slate-200"${_scopeId}>Belum ada reservasi</h3><p class="text-xs text-slate-400 mt-1"${_scopeId}>Gunakan tombol di atas untuk mendaftarkan jadwal booking meja baru.</p></div>`);
						}
						if (isFormModalOpen.value) {
							_push(`<div class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-950/60 backdrop-blur-sm"${_scopeId}><div class="bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl w-full max-w-md overflow-hidden transform transition-all"${_scopeId}><div class="px-6 py-4 border-b border-slate-200 dark:border-slate-800 flex items-center justify-between"${_scopeId}><h3 class="text-sm font-extrabold text-slate-900 dark:text-slate-100"${_scopeId}>${ssrInterpolate(editingReservation.value ? "Edit Detail Booking" : "Buat Reservasi Meja")}</h3><button class="p-1.5 hover:bg-slate-100 dark:hover:bg-slate-900 rounded-lg text-slate-400 cursor-pointer"${_scopeId}>`);
							_push(ssrRenderComponent(unref(X), { class: "h-4 w-4" }, null, _parent, _scopeId));
							_push(`</button></div><form class="p-6 space-y-4"${_scopeId}><div${_scopeId}><label class="block text-[11px] font-bold text-slate-450 dark:text-slate-500 uppercase tracking-wider mb-1.5"${_scopeId}>Pelanggan</label><select required class="w-full h-10 px-3 border border-slate-200 dark:border-slate-700 rounded-xl bg-slate-50 dark:bg-slate-800 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-[#8c5a3c]/20 focus:border-[#8c5a3c] cursor-pointer"${_scopeId}><option value=""${ssrIncludeBooleanAttr(Array.isArray(unref(form).customer_id) ? ssrLooseContain(unref(form).customer_id, "") : ssrLooseEqual(unref(form).customer_id, "")) ? " selected" : ""}${_scopeId}>Pilih customer...</option><!--[-->`);
							ssrRenderList(__props.customers, (c) => {
								_push(`<option${ssrRenderAttr("value", String(c.id))}${ssrIncludeBooleanAttr(Array.isArray(unref(form).customer_id) ? ssrLooseContain(unref(form).customer_id, String(c.id)) : ssrLooseEqual(unref(form).customer_id, String(c.id))) ? " selected" : ""}${_scopeId}>${ssrInterpolate(c.name)}</option>`);
							});
							_push(`<!--]--></select></div><div${_scopeId}><label class="block text-[11px] font-bold text-slate-450 dark:text-slate-500 uppercase tracking-wider mb-1.5"${_scopeId}>Cabang Outlet</label><select required class="w-full h-10 px-3 border border-slate-200 dark:border-slate-700 rounded-xl bg-slate-50 dark:bg-slate-800 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-[#8c5a3c]/20 focus:border-[#8c5a3c] cursor-pointer"${_scopeId}><!--[-->`);
							ssrRenderList(__props.outlets, (ot) => {
								_push(`<option${ssrRenderAttr("value", ot.id)}${ssrIncludeBooleanAttr(Array.isArray(unref(form).outlet_id) ? ssrLooseContain(unref(form).outlet_id, ot.id) : ssrLooseEqual(unref(form).outlet_id, ot.id)) ? " selected" : ""}${_scopeId}>${ssrInterpolate(ot.name)}</option>`);
							});
							_push(`<!--]--></select></div><div${_scopeId}><label class="block text-[11px] font-bold text-slate-450 dark:text-slate-500 uppercase tracking-wider mb-1.5"${_scopeId}>Nomor Meja</label><select required class="w-full h-10 px-3 border border-slate-200 dark:border-slate-700 rounded-xl bg-slate-50 dark:bg-slate-800 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-[#8c5a3c]/20 focus:border-[#8c5a3c] cursor-pointer"${_scopeId}><option value=""${ssrIncludeBooleanAttr(Array.isArray(unref(form).table_id) ? ssrLooseContain(unref(form).table_id, "") : ssrLooseEqual(unref(form).table_id, "")) ? " selected" : ""}${_scopeId}>Pilih meja...</option><!--[-->`);
							ssrRenderList(formFilteredTables.value, (t) => {
								_push(`<option${ssrRenderAttr("value", String(t.id))}${ssrIncludeBooleanAttr(Array.isArray(unref(form).table_id) ? ssrLooseContain(unref(form).table_id, String(t.id)) : ssrLooseEqual(unref(form).table_id, String(t.id))) ? " selected" : ""}${_scopeId}>${ssrInterpolate(t.number)}</option>`);
							});
							_push(`<!--]--></select></div><div class="grid grid-cols-2 gap-4"${_scopeId}><div${_scopeId}><label class="block text-[11px] font-bold text-slate-450 dark:text-slate-500 uppercase tracking-wider mb-1.5"${_scopeId}>Tanggal Booking</label><input type="date"${ssrRenderAttr("value", unref(form).reservation_date)} required class="w-full h-10 px-3 border border-slate-200 dark:border-slate-700 rounded-xl bg-slate-50 dark:bg-slate-800 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-[#8c5a3c]/20 focus:border-[#8c5a3c]"${_scopeId}></div><div${_scopeId}><label class="block text-[11px] font-bold text-slate-450 dark:text-slate-500 uppercase tracking-wider mb-1.5"${_scopeId}>Jam Booking</label><input type="time"${ssrRenderAttr("value", unref(form).reservation_time)} required class="w-full h-10 px-3 border border-slate-200 dark:border-slate-700 rounded-xl bg-slate-50 dark:bg-slate-800 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-[#8c5a3c]/20 focus:border-[#8c5a3c]"${_scopeId}></div></div><div${_scopeId}><label class="block text-[11px] font-bold text-slate-450 dark:text-slate-500 uppercase tracking-wider mb-1.5"${_scopeId}>Status Persetujuan</label><select required class="w-full h-10 px-3 border border-slate-200 dark:border-slate-700 rounded-xl bg-slate-50 dark:bg-slate-800 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-[#8c5a3c]/20 focus:border-[#8c5a3c] cursor-pointer"${_scopeId}><option value="pending"${ssrIncludeBooleanAttr(Array.isArray(unref(form).status) ? ssrLooseContain(unref(form).status, "pending") : ssrLooseEqual(unref(form).status, "pending")) ? " selected" : ""}${_scopeId}>Pending (Menunggu)</option><option value="confirmed"${ssrIncludeBooleanAttr(Array.isArray(unref(form).status) ? ssrLooseContain(unref(form).status, "confirmed") : ssrLooseEqual(unref(form).status, "confirmed")) ? " selected" : ""}${_scopeId}>Confirmed (Disetujui)</option><option value="cancelled"${ssrIncludeBooleanAttr(Array.isArray(unref(form).status) ? ssrLooseContain(unref(form).status, "cancelled") : ssrLooseEqual(unref(form).status, "cancelled")) ? " selected" : ""}${_scopeId}>Cancelled (Dibatalkan)</option></select></div><div class="flex items-center justify-end gap-3 pt-4 border-t border-slate-100 dark:border-slate-800"${_scopeId}><button type="button" class="px-4 py-2 border border-slate-200 dark:border-slate-800 text-slate-700 dark:text-slate-350 text-xs font-bold rounded-xl hover:bg-slate-50 dark:hover:bg-slate-800 cursor-pointer"${_scopeId}> Batal </button><button type="submit"${ssrIncludeBooleanAttr(unref(form).processing) ? " disabled" : ""} class="px-4 py-2 bg-[#8c5a3c] hover:bg-[#734a31] text-white text-xs font-bold rounded-xl cursor-pointer disabled:opacity-50"${_scopeId}>${ssrInterpolate(unref(form).processing ? "Menyimpan..." : "Simpan")}</button></div></form></div></div>`);
						} else _push(`<!---->`);
						_push(`</div>`);
					} else return [createVNode("div", { class: "space-y-6" }, [
						createVNode("div", { class: "flex flex-col sm:flex-row sm:items-center justify-between gap-4" }, [createVNode("div", null, [createVNode("h1", { class: "text-2xl font-extrabold text-slate-900 dark:text-slate-50 tracking-tight" }, " Reservasi Meja "), createVNode("p", { class: "text-sm text-slate-500 dark:text-slate-400 mt-1" }, " Catat dan kelola pesanan meja dari pelanggan untuk waktu tertentu. ")]), createVNode("button", {
							onClick: openCreateModal,
							class: "flex items-center justify-center gap-2 px-4 py-2 bg-[#8c5a3c] hover:bg-[#734a31] text-white text-sm font-bold rounded-xl transition-all cursor-pointer shadow-lg shadow-[#8c5a3c]/10"
						}, [createVNode(unref(Plus), { class: "h-4 w-4" }), createTextVNode(" Buat Reservasi ")])]),
						createVNode("div", { class: "flex flex-wrap items-center justify-between gap-4 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl px-5 py-4 shadow-sm" }, [createVNode("div", { class: "flex items-center gap-3" }, [
							createVNode(unref(Store), { class: "h-5 w-5 text-slate-400" }),
							createVNode("span", { class: "text-xs font-bold text-slate-500 uppercase tracking-wide" }, "Cabang Outlet:"),
							withDirectives(createVNode("select", {
								"onUpdate:modelValue": ($event) => selectedOutletId.value = $event,
								class: "h-9 px-3 border border-slate-200 dark:border-slate-700 rounded-lg bg-slate-50 dark:bg-slate-800 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-[#8c5a3c]/20 text-slate-900 dark:text-slate-100 cursor-pointer"
							}, [(openBlock(true), createBlock(Fragment, null, renderList(__props.outlets, (ot) => {
								return openBlock(), createBlock("option", {
									key: ot.id,
									value: String(ot.id)
								}, toDisplayString(ot.name), 9, ["value"]);
							}), 128))], 8, ["onUpdate:modelValue"]), [[vModelSelect, selectedOutletId.value]])
						])]),
						__props.reservations.data.length > 0 ? (openBlock(), createBlock("div", {
							key: 0,
							class: "bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-sm overflow-hidden"
						}, [createVNode("div", { class: "overflow-x-auto" }, [createVNode("table", { class: "w-full text-left border-collapse" }, [createVNode("thead", null, [createVNode("tr", { class: "border-b border-slate-100 dark:border-slate-800 bg-slate-50/50 dark:bg-slate-900/50" }, [
							createVNode("th", { class: "px-6 py-3.5 text-[11px] font-bold text-slate-400 uppercase tracking-wider" }, "Pelanggan"),
							createVNode("th", { class: "px-6 py-3.5 text-[11px] font-bold text-slate-400 uppercase tracking-wider" }, "Meja"),
							createVNode("th", { class: "px-6 py-3.5 text-[11px] font-bold text-slate-400 uppercase tracking-wider" }, "Cabang"),
							createVNode("th", { class: "px-6 py-3.5 text-[11px] font-bold text-slate-400 uppercase tracking-wider" }, "Waktu Pemesanan"),
							createVNode("th", { class: "px-6 py-3.5 text-[11px] font-bold text-slate-400 uppercase tracking-wider" }, "Status"),
							createVNode("th", { class: "px-6 py-3.5 text-[11px] font-bold text-slate-400 uppercase tracking-wider text-right" }, "Aksi")
						])]), createVNode("tbody", { class: "divide-y divide-slate-100 dark:divide-slate-800" }, [(openBlock(true), createBlock(Fragment, null, renderList(__props.reservations.data, (res) => {
							return openBlock(), createBlock("tr", {
								key: res.id,
								class: "hover:bg-slate-50/30 dark:hover:bg-slate-800/10"
							}, [
								createVNode("td", { class: "px-6 py-4" }, [createVNode("div", { class: "flex items-center gap-2" }, [createVNode(unref(Users), { class: "h-4 w-4 text-[#8c5a3c]" }), createVNode("span", { class: "font-extrabold text-xs text-slate-850 dark:text-slate-100" }, toDisplayString(res.customer?.name), 1)])]),
								createVNode("td", { class: "px-6 py-4" }, [createVNode("span", { class: "font-bold text-xs text-slate-700 dark:text-slate-350" }, toDisplayString(res.table?.number), 1)]),
								createVNode("td", { class: "px-6 py-4 text-xs text-slate-500" }, toDisplayString(res.outlet?.name), 1),
								createVNode("td", { class: "px-6 py-4" }, [createVNode("div", { class: "flex flex-col gap-0.5 text-xs text-slate-655 dark:text-slate-300" }, [createVNode("span", { class: "font-semibold flex items-center gap-1.5" }, [createVNode(unref(Calendar), { class: "h-3.5 w-3.5 text-slate-400" }), createTextVNode(" " + toDisplayString(new Date(res.reservation_date).toLocaleDateString("id-ID", { dateStyle: "medium" })), 1)]), createVNode("span", { class: "text-[10px] text-slate-400 flex items-center gap-1.5" }, [createVNode(unref(Clock), { class: "h-3.5 w-3.5 text-slate-400" }), createTextVNode(" " + toDisplayString(res.reservation_time.slice(0, 5)), 1)])])]),
								createVNode("td", { class: "px-6 py-4" }, [createVNode("span", { class: ["px-2.5 py-0.5 border rounded-full text-[9px] font-extrabold uppercase tracking-wider", getStatusBadge(res.status)] }, toDisplayString(res.status), 3)]),
								createVNode("td", { class: "px-6 py-4 text-right" }, [createVNode("div", { class: "flex items-center justify-end gap-2" }, [createVNode("button", {
									onClick: ($event) => openEditModal(res),
									class: "p-1.5 hover:bg-slate-100 dark:hover:bg-slate-800 text-slate-500 hover:text-slate-800 dark:hover:text-slate-200 rounded-lg cursor-pointer"
								}, [createVNode(unref(Edit2), { class: "h-3.5 w-3.5" })], 8, ["onClick"]), createVNode("button", {
									onClick: ($event) => deleteReservation(res),
									class: "p-1.5 hover:bg-slate-100 dark:hover:bg-slate-800 text-slate-555 hover:text-rose-600 rounded-lg cursor-pointer"
								}, [createVNode(unref(Trash2), { class: "h-3.5 w-3.5" })], 8, ["onClick"])])])
							]);
						}), 128))])])]), __props.reservations.last_page > 1 ? (openBlock(), createBlock("div", {
							key: 0,
							class: "px-6 py-4 border-t border-slate-100 dark:border-slate-800 flex items-center justify-between gap-4"
						}, [createVNode("span", { class: "text-xs text-slate-500" }, "Total " + toDisplayString(__props.reservations.total) + " reservasi", 1), createVNode("div", { class: "flex items-center gap-2" }, [(openBlock(true), createBlock(Fragment, null, renderList(__props.reservations.links, (link) => {
							return openBlock(), createBlock(_component_Link, {
								key: link.label,
								href: link.url || "#",
								class: [
									"px-3 py-1.5 border rounded-lg text-xs font-semibold cursor-pointer",
									link.active ? "bg-[#8c5a3c] text-white border-[#8c5a3c]" : "border-slate-200 dark:border-slate-800 hover:bg-slate-50 dark:hover:bg-slate-800 text-slate-700 dark:text-slate-350",
									!link.url ? "opacity-50 pointer-events-none" : ""
								],
								innerHTML: link.label
							}, null, 8, [
								"href",
								"class",
								"innerHTML"
							]);
						}), 128))])])) : createCommentVNode("", true)])) : (openBlock(), createBlock("div", {
							key: 1,
							class: "text-center py-16 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-sm"
						}, [
							createVNode(unref(Calendar), { class: "h-10 w-10 text-slate-350 dark:text-slate-655 mx-auto mb-3" }),
							createVNode("h3", { class: "text-sm font-bold text-slate-800 dark:text-slate-200" }, "Belum ada reservasi"),
							createVNode("p", { class: "text-xs text-slate-400 mt-1" }, "Gunakan tombol di atas untuk mendaftarkan jadwal booking meja baru.")
						])),
						isFormModalOpen.value ? (openBlock(), createBlock("div", {
							key: 2,
							class: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-950/60 backdrop-blur-sm"
						}, [createVNode("div", { class: "bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl w-full max-w-md overflow-hidden transform transition-all" }, [createVNode("div", { class: "px-6 py-4 border-b border-slate-200 dark:border-slate-800 flex items-center justify-between" }, [createVNode("h3", { class: "text-sm font-extrabold text-slate-900 dark:text-slate-100" }, toDisplayString(editingReservation.value ? "Edit Detail Booking" : "Buat Reservasi Meja"), 1), createVNode("button", {
							onClick: ($event) => isFormModalOpen.value = false,
							class: "p-1.5 hover:bg-slate-100 dark:hover:bg-slate-900 rounded-lg text-slate-400 cursor-pointer"
						}, [createVNode(unref(X), { class: "h-4 w-4" })], 8, ["onClick"])]), createVNode("form", {
							onSubmit: withModifiers(submitForm, ["prevent"]),
							class: "p-6 space-y-4"
						}, [
							createVNode("div", null, [createVNode("label", { class: "block text-[11px] font-bold text-slate-450 dark:text-slate-500 uppercase tracking-wider mb-1.5" }, "Pelanggan"), withDirectives(createVNode("select", {
								"onUpdate:modelValue": ($event) => unref(form).customer_id = $event,
								required: "",
								class: "w-full h-10 px-3 border border-slate-200 dark:border-slate-700 rounded-xl bg-slate-50 dark:bg-slate-800 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-[#8c5a3c]/20 focus:border-[#8c5a3c] cursor-pointer"
							}, [createVNode("option", { value: "" }, "Pilih customer..."), (openBlock(true), createBlock(Fragment, null, renderList(__props.customers, (c) => {
								return openBlock(), createBlock("option", {
									key: c.id,
									value: String(c.id)
								}, toDisplayString(c.name), 9, ["value"]);
							}), 128))], 8, ["onUpdate:modelValue"]), [[vModelSelect, unref(form).customer_id]])]),
							createVNode("div", null, [createVNode("label", { class: "block text-[11px] font-bold text-slate-450 dark:text-slate-500 uppercase tracking-wider mb-1.5" }, "Cabang Outlet"), withDirectives(createVNode("select", {
								"onUpdate:modelValue": ($event) => unref(form).outlet_id = $event,
								required: "",
								class: "w-full h-10 px-3 border border-slate-200 dark:border-slate-700 rounded-xl bg-slate-50 dark:bg-slate-800 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-[#8c5a3c]/20 focus:border-[#8c5a3c] cursor-pointer"
							}, [(openBlock(true), createBlock(Fragment, null, renderList(__props.outlets, (ot) => {
								return openBlock(), createBlock("option", {
									key: ot.id,
									value: ot.id
								}, toDisplayString(ot.name), 9, ["value"]);
							}), 128))], 8, ["onUpdate:modelValue"]), [[vModelSelect, unref(form).outlet_id]])]),
							createVNode("div", null, [createVNode("label", { class: "block text-[11px] font-bold text-slate-450 dark:text-slate-500 uppercase tracking-wider mb-1.5" }, "Nomor Meja"), withDirectives(createVNode("select", {
								"onUpdate:modelValue": ($event) => unref(form).table_id = $event,
								required: "",
								class: "w-full h-10 px-3 border border-slate-200 dark:border-slate-700 rounded-xl bg-slate-50 dark:bg-slate-800 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-[#8c5a3c]/20 focus:border-[#8c5a3c] cursor-pointer"
							}, [createVNode("option", { value: "" }, "Pilih meja..."), (openBlock(true), createBlock(Fragment, null, renderList(formFilteredTables.value, (t) => {
								return openBlock(), createBlock("option", {
									key: t.id,
									value: String(t.id)
								}, toDisplayString(t.number), 9, ["value"]);
							}), 128))], 8, ["onUpdate:modelValue"]), [[vModelSelect, unref(form).table_id]])]),
							createVNode("div", { class: "grid grid-cols-2 gap-4" }, [createVNode("div", null, [createVNode("label", { class: "block text-[11px] font-bold text-slate-450 dark:text-slate-500 uppercase tracking-wider mb-1.5" }, "Tanggal Booking"), withDirectives(createVNode("input", {
								type: "date",
								"onUpdate:modelValue": ($event) => unref(form).reservation_date = $event,
								required: "",
								class: "w-full h-10 px-3 border border-slate-200 dark:border-slate-700 rounded-xl bg-slate-50 dark:bg-slate-800 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-[#8c5a3c]/20 focus:border-[#8c5a3c]"
							}, null, 8, ["onUpdate:modelValue"]), [[vModelText, unref(form).reservation_date]])]), createVNode("div", null, [createVNode("label", { class: "block text-[11px] font-bold text-slate-450 dark:text-slate-500 uppercase tracking-wider mb-1.5" }, "Jam Booking"), withDirectives(createVNode("input", {
								type: "time",
								"onUpdate:modelValue": ($event) => unref(form).reservation_time = $event,
								required: "",
								class: "w-full h-10 px-3 border border-slate-200 dark:border-slate-700 rounded-xl bg-slate-50 dark:bg-slate-800 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-[#8c5a3c]/20 focus:border-[#8c5a3c]"
							}, null, 8, ["onUpdate:modelValue"]), [[vModelText, unref(form).reservation_time]])])]),
							createVNode("div", null, [createVNode("label", { class: "block text-[11px] font-bold text-slate-450 dark:text-slate-500 uppercase tracking-wider mb-1.5" }, "Status Persetujuan"), withDirectives(createVNode("select", {
								"onUpdate:modelValue": ($event) => unref(form).status = $event,
								required: "",
								class: "w-full h-10 px-3 border border-slate-200 dark:border-slate-700 rounded-xl bg-slate-50 dark:bg-slate-800 text-xs font-semibold focus:outline-none focus:ring-2 focus:ring-[#8c5a3c]/20 focus:border-[#8c5a3c] cursor-pointer"
							}, [
								createVNode("option", { value: "pending" }, "Pending (Menunggu)"),
								createVNode("option", { value: "confirmed" }, "Confirmed (Disetujui)"),
								createVNode("option", { value: "cancelled" }, "Cancelled (Dibatalkan)")
							], 8, ["onUpdate:modelValue"]), [[vModelSelect, unref(form).status]])]),
							createVNode("div", { class: "flex items-center justify-end gap-3 pt-4 border-t border-slate-100 dark:border-slate-800" }, [createVNode("button", {
								type: "button",
								onClick: ($event) => isFormModalOpen.value = false,
								class: "px-4 py-2 border border-slate-200 dark:border-slate-800 text-slate-700 dark:text-slate-350 text-xs font-bold rounded-xl hover:bg-slate-50 dark:hover:bg-slate-800 cursor-pointer"
							}, " Batal ", 8, ["onClick"]), createVNode("button", {
								type: "submit",
								disabled: unref(form).processing,
								class: "px-4 py-2 bg-[#8c5a3c] hover:bg-[#734a31] text-white text-xs font-bold rounded-xl cursor-pointer disabled:opacity-50"
							}, toDisplayString(unref(form).processing ? "Menyimpan..." : "Simpan"), 9, ["disabled"])])
						], 32)])])) : createCommentVNode("", true)
					])];
				}),
				_: 1
			}, _parent));
			_push(`<!--]-->`);
		};
	}
});
//#endregion
//#region resources/js/Pages/CafePOS/Reservations/Index.vue
var _sfc_setup = Index_vue_vue_type_script_setup_true_lang_default.setup;
Index_vue_vue_type_script_setup_true_lang_default.setup = (props, ctx) => {
	const ssrContext = useSSRContext();
	(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/Pages/CafePOS/Reservations/Index.vue");
	return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
var Index_default = Index_vue_vue_type_script_setup_true_lang_default;
//#endregion
export { Index_default as default };
