import { t as DemoModeBanner_default } from "./DemoModeBanner-BXA28cY_.js";
import { Head, Link, router, usePage } from "@inertiajs/vue3";
import { computed, createTextVNode, createVNode, defineComponent, onMounted, onUnmounted, ref, resolveDynamicComponent, unref, useSSRContext, watch, withCtx } from "vue";
import { ssrIncludeBooleanAttr, ssrInterpolate, ssrLooseContain, ssrLooseEqual, ssrRenderAttr, ssrRenderClass, ssrRenderComponent, ssrRenderList, ssrRenderVNode } from "vue/server-renderer";
import { AlertTriangle, Check, CheckCircle2, ClipboardList, Clock, History, List, LogOut, Maximize, Minimize, Moon, Play, RefreshCw, Sun, X } from "lucide-vue-next";
//#region resources/js/Pages/CafePOS/Kds/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: {
		items: {},
		outlets: {},
		filters: {}
	},
	setup(__props) {
		const props = __props;
		const selectedOutletId = ref(props.filters.outlet_id || (props.outlets[0] ? String(props.outlets[0].id) : ""));
		const activeTab = ref("order");
		watch(selectedOutletId, (newVal) => {
			router.get(route("kds.index"), { outlet_id: newVal }, {
				preserveState: true,
				replace: true
			});
		});
		const getStatusBadge = (status) => {
			switch (status) {
				case "pending": return "bg-rose-500/10 text-rose-600 dark:text-rose-400 border-rose-500/20";
				case "cooking": return "bg-sky-500/10 text-sky-600 dark:text-sky-400 border-sky-500/20";
				case "ready": return "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/20";
				default: return "bg-slate-500/10 text-slate-600 dark:text-slate-400 border-slate-500/20";
			}
		};
		const getElapsedMinutes = (createdAtString) => {
			const created = new Date(createdAtString).getTime();
			const diff = Math.floor((Date.now() - created) / 6e4);
			return diff > 0 ? `${diff}m ago` : "just now";
		};
		const activeItems = computed(() => {
			return props.items.filter((item) => item.kitchen_status !== "served");
		});
		const servedItems = computed(() => {
			return props.items.filter((item) => item.kitchen_status === "served").sort((a, b) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime());
		});
		const groupedTransactions = computed(() => {
			const txns = {};
			for (const item of activeItems.value) {
				if (!item.transaction) continue;
				const tId = item.transaction_id;
				if (!txns[tId]) txns[tId] = {
					id: tId,
					transaction_number: item.transaction.transaction_number,
					order_type: item.transaction.order_type,
					queue_number: item.transaction.queue_number,
					table_number: item.transaction.table?.number || null,
					created_at: item.transaction.created_at,
					items: []
				};
				txns[tId].items.push(item);
			}
			return Object.values(txns).sort((a, b) => new Date(a.created_at).getTime() - new Date(b.created_at).getTime());
		});
		let intervalId = null;
		const isDark = ref(false);
		const isFullscreen = ref(false);
		onMounted(() => {
			isDark.value = document.documentElement.classList.contains("dark");
			document.addEventListener("fullscreenchange", () => {
				isFullscreen.value = !!document.fullscreenElement;
			});
			intervalId = setInterval(() => {
				router.reload();
			}, 15e3);
		});
		onUnmounted(() => {
			if (intervalId) clearInterval(intervalId);
		});
		const activeAlert = ref(null);
		let alertTimeoutId = null;
		const triggerAlert = (type, message) => {
			if (alertTimeoutId) clearTimeout(alertTimeoutId);
			activeAlert.value = {
				type,
				message
			};
			alertTimeoutId = setTimeout(() => {
				activeAlert.value = null;
			}, 4e3);
		};
		const page = usePage();
		watch(() => page.props.flash, (flash) => {
			if (flash?.success) triggerAlert("success", String(flash.success));
			else if (flash?.error) triggerAlert("error", String(flash.error));
		}, {
			deep: true,
			immediate: true
		});
		return (_ctx, _push, _parent, _attrs) => {
			_push(`<!--[-->`);
			_push(ssrRenderComponent(unref(Head), { title: "KDS (Kitchen Display System)" }, null, _parent));
			_push(`<div class="min-h-screen bg-slate-50 dark:bg-slate-950 text-slate-900 dark:text-slate-100 flex flex-col font-sans select-none transition-colors">`);
			if (activeAlert.value) {
				_push(`<div class="${ssrRenderClass([activeAlert.value.type === "success" ? "border-emerald-500/30" : "border-rose-500/30", "fixed top-6 right-6 z-[100] w-full max-w-sm overflow-hidden rounded-xl border bg-white/95 dark:bg-slate-950/95 backdrop-blur-md shadow-lg transition-all duration-300 pointer-events-auto select-none font-sans"])}"><div class="p-4 flex items-start gap-3 relative"><div class="${ssrRenderClass([activeAlert.value.type === "success" ? "bg-emerald-500" : "bg-rose-500", "absolute left-0 top-0 bottom-0 w-1"])}"></div><div class="flex-shrink-0 mt-0.5">`);
				ssrRenderVNode(_push, createVNode(resolveDynamicComponent(activeAlert.value.type === "success" ? unref(CheckCircle2) : unref(AlertTriangle)), { class: ["h-5 w-5", activeAlert.value.type === "success" ? "text-emerald-500" : "text-rose-500"] }, null), _parent);
				_push(`</div><div class="flex-1 min-w-0 pr-2"><p class="${ssrRenderClass([activeAlert.value.type === "success" ? "text-emerald-600 dark:text-emerald-400" : "text-rose-600 dark:text-rose-400", "text-[10px] font-extrabold uppercase tracking-widest leading-none mb-1.5"])}">${ssrInterpolate(activeAlert.value.type === "success" ? "Berhasil" : "Peringatan")}</p><p class="text-xs text-slate-700 dark:text-slate-300 font-bold leading-normal">${ssrInterpolate(activeAlert.value.message)}</p></div><button class="flex-shrink-0 p-1 hover:bg-slate-100 dark:hover:bg-slate-900 rounded-lg text-slate-400 dark:text-slate-500 hover:text-slate-700 dark:hover:text-slate-300 transition-colors cursor-pointer">`);
				_push(ssrRenderComponent(unref(X), { class: "h-4 w-4" }, null, _parent));
				_push(`</button></div></div>`);
			} else _push(`<!---->`);
			_push(ssrRenderComponent(DemoModeBanner_default, null, null, _parent));
			if (!isFullscreen.value) {
				_push(`<header class="h-16 border-b border-slate-200 dark:border-slate-900 bg-white dark:bg-slate-950 px-6 flex items-center justify-between flex-shrink-0 z-10 shadow-sm transition-colors"><div class="flex items-center gap-3"><div class="h-8 w-8 rounded-lg bg-[#8c5a3c] flex items-center justify-center font-extrabold text-white text-base"><span>K</span></div><div class="flex flex-col"><span class="font-black text-sm tracking-widest uppercase leading-none text-slate-900 dark:text-white">CafePOS KDS</span><span class="text-[9px] text-slate-400 dark:text-slate-500 mt-1 leading-none">Kitchen Display System</span></div></div><div class="flex rounded-xl bg-slate-100 dark:bg-slate-900 p-1 border border-slate-200 dark:border-slate-800"><button class="${ssrRenderClass(["px-3.5 py-1.5 rounded-lg text-xs font-bold transition-all flex items-center gap-1.5 cursor-pointer", activeTab.value === "order" ? "bg-[#8c5a3c] text-white shadow-sm" : "text-slate-500 dark:text-slate-400 hover:text-slate-800 dark:hover:text-slate-200"])}">`);
				_push(ssrRenderComponent(unref(ClipboardList), { class: "h-3.5 w-3.5" }, null, _parent));
				_push(`<span>Tampilan Order</span></button><button class="${ssrRenderClass(["px-3.5 py-1.5 rounded-lg text-xs font-bold transition-all flex items-center gap-1.5 cursor-pointer", activeTab.value === "item" ? "bg-[#8c5a3c] text-white shadow-sm" : "text-slate-500 dark:text-slate-400 hover:text-slate-800 dark:hover:text-slate-200"])}">`);
				_push(ssrRenderComponent(unref(List), { class: "h-3.5 w-3.5" }, null, _parent));
				_push(`<span>Tampilan Item</span></button><button class="${ssrRenderClass(["px-3.5 py-1.5 rounded-lg text-xs font-bold transition-all flex items-center gap-1.5 cursor-pointer", activeTab.value === "history" ? "bg-[#8c5a3c] text-white shadow-sm" : "text-slate-500 dark:text-slate-400 hover:text-slate-800 dark:hover:text-slate-200"])}">`);
				_push(ssrRenderComponent(unref(History), { class: "h-3.5 w-3.5" }, null, _parent));
				_push(`<span>Riwayat Selesai</span></button></div><div class="flex items-center gap-3"><div class="flex items-center gap-2"><span class="text-[10px] text-slate-400 dark:text-slate-550 font-bold uppercase tracking-wider">Outlet:</span><select class="h-8 px-2.5 border border-slate-200 dark:border-slate-800 rounded-lg bg-slate-50 dark:bg-slate-900 text-xs font-semibold focus:outline-none text-slate-900 dark:text-slate-100 cursor-pointer"><!--[-->`);
				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" : ""}>${ssrInterpolate(ot.name)}</option>`);
				});
				_push(`<!--]--></select></div>`);
				_push(ssrRenderComponent(unref(Link), {
					href: _ctx.route("dashboard"),
					class: "h-8 px-3 rounded-lg border border-slate-200 dark:border-slate-800 bg-slate-50 dark:bg-slate-900 flex items-center justify-center text-xs font-bold text-slate-750 dark:text-slate-300 hover:text-[#8c5a3c] dark:hover:text-white cursor-pointer transition-colors"
				}, {
					default: withCtx((_, _push, _parent, _scopeId) => {
						if (_push) _push(` Dashboard `);
						else return [createTextVNode(" Dashboard ")];
					}),
					_: 1
				}, _parent));
				_push(`<button class="h-8 w-8 rounded-lg border border-slate-200 dark:border-slate-800 bg-slate-50 dark:bg-slate-900 flex items-center justify-center text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-white cursor-pointer transition-colors" title="Muat Ulang">`);
				_push(ssrRenderComponent(unref(RefreshCw), { class: "h-4 w-4" }, null, _parent));
				_push(`</button><button class="h-8 w-8 rounded-lg border border-slate-200 dark:border-slate-800 bg-slate-50 dark:bg-slate-900 flex items-center justify-center text-slate-555 dark:text-slate-400 cursor-pointer transition-colors" title="Ganti Tema">`);
				if (isDark.value) _push(ssrRenderComponent(unref(Sun), { class: "h-4 w-4 text-amber-500" }, null, _parent));
				else _push(ssrRenderComponent(unref(Moon), { class: "h-4 w-4" }, null, _parent));
				_push(`</button><button class="h-8 w-8 rounded-lg border border-slate-200 dark:border-slate-800 bg-slate-50 dark:bg-slate-900 flex items-center justify-center text-slate-555 dark:text-slate-400 cursor-pointer transition-colors" title="Toggle Layar Penuh">`);
				if (isFullscreen.value) _push(ssrRenderComponent(unref(Minimize), { class: "h-4 w-4" }, null, _parent));
				else _push(ssrRenderComponent(unref(Maximize), { class: "h-4 w-4" }, null, _parent));
				_push(`</button><button class="h-8 w-8 rounded-lg border border-rose-200 dark:border-rose-900/50 bg-rose-50 dark:bg-rose-950/30 flex items-center justify-center text-rose-500 hover:text-rose-700 dark:text-rose-400 dark:hover:text-rose-300 cursor-pointer transition-colors" title="Logout">`);
				_push(ssrRenderComponent(unref(LogOut), { class: "h-4 w-4" }, null, _parent));
				_push(`</button></div></header>`);
			} else _push(`<!---->`);
			if (isFullscreen.value) {
				_push(`<div class="fixed top-4 right-4 z-50 flex items-center gap-2"><button class="px-3 py-1.5 rounded-lg bg-slate-900/80 hover:bg-slate-950 text-white text-xs font-bold shadow-md flex items-center gap-1.5 cursor-pointer backdrop-blur-sm">`);
				_push(ssrRenderComponent(unref(Minimize), { class: "h-3.5 w-3.5" }, null, _parent));
				_push(`<span>Keluar Layar Penuh (Esc)</span></button></div>`);
			} else _push(`<!---->`);
			_push(`<main class="flex-1 p-6 overflow-y-auto">`);
			if (activeTab.value === "order") {
				_push(`<div>`);
				if (groupedTransactions.value.length > 0) {
					_push(`<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6"><!--[-->`);
					ssrRenderList(groupedTransactions.value, (txn) => {
						_push(`<div class="bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-sm overflow-hidden flex flex-col justify-between"><div class="px-4 py-3 bg-slate-50/80 dark:bg-slate-950 border-b border-slate-200 dark:border-slate-850 flex items-center justify-between"><div class="flex flex-col"><span class="text-xs font-black text-slate-900 dark:text-white">${ssrInterpolate(txn.order_type === "dine_in" ? txn.table_number : txn.queue_number || "Take Away")}</span><span class="text-[9px] text-slate-400 font-medium">#${ssrInterpolate(txn.transaction_number.slice(-6))}</span></div><div class="flex items-center gap-2"><span class="text-[9px] font-extrabold uppercase px-1.5 py-0.5 rounded border border-slate-200 dark:border-slate-800 text-slate-500 bg-white dark:bg-slate-900">${ssrInterpolate(txn.order_type === "dine_in" ? "DINE IN" : "TAKE AWAY")}</span><span class="text-[9px] text-slate-400 font-bold flex items-center gap-1">`);
						_push(ssrRenderComponent(unref(Clock), { class: "h-3 w-3" }, null, _parent));
						_push(` ${ssrInterpolate(getElapsedMinutes(txn.created_at))}</span></div></div><div class="p-4 flex-1 divide-y divide-slate-100 dark:divide-slate-850 space-y-3"><!--[-->`);
						ssrRenderList(txn.items, (item) => {
							_push(`<div class="pt-3 first:pt-0 flex flex-col justify-between gap-2.5"><div class="flex items-start justify-between gap-3"><div class="flex-1"><div class="font-extrabold text-sm text-slate-800 dark:text-white leading-tight">${ssrInterpolate(item.product?.name)}</div>`);
							if (item.variant) _push(`<div class="text-[9px] font-black uppercase text-[#8c5a3c] mt-0.5">${ssrInterpolate(item.variant)}</div>`);
							else _push(`<!---->`);
							if (item.modifiers.length > 0) {
								_push(`<div class="mt-1 space-y-0.5"><!--[-->`);
								ssrRenderList(item.modifiers, (m) => {
									_push(`<div class="text-[9px] font-bold text-slate-450 dark:text-slate-500 flex items-center gap-1"><span class="h-1 w-1 bg-amber-500 rounded-full"></span><span>${ssrInterpolate(m.modifier?.name)}</span></div>`);
								});
								_push(`<!--]--></div>`);
							} else _push(`<!---->`);
							_push(`</div><span class="text-sm font-black px-2 py-0.5 bg-slate-100 dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-lg"> x${ssrInterpolate(item.qty)}</span></div><div class="flex items-center justify-between gap-3"><span class="${ssrRenderClass(["px-2 py-0.5 border rounded-full text-[9px] font-black uppercase tracking-wider", getStatusBadge(item.kitchen_status)])}">${ssrInterpolate(item.kitchen_status)}</span>`);
							if (item.kitchen_status === "pending") {
								_push(`<button class="px-3 py-1 bg-rose-600 hover:bg-rose-500 text-white rounded-lg text-[10px] font-bold cursor-pointer flex items-center gap-1">`);
								_push(ssrRenderComponent(unref(Play), { class: "h-3 w-3 fill-current" }, null, _parent));
								_push(` Mulai Masak </button>`);
							} else if (item.kitchen_status === "cooking") {
								_push(`<button class="px-3 py-1 bg-sky-600 hover:bg-sky-500 text-white rounded-lg text-[10px] font-bold cursor-pointer flex items-center gap-1">`);
								_push(ssrRenderComponent(unref(Check), { class: "h-3 w-3" }, null, _parent));
								_push(` Selesai Masak </button>`);
							} else if (item.kitchen_status === "ready") {
								_push(`<button class="px-3 py-1 bg-emerald-600 hover:bg-emerald-500 text-white rounded-lg text-[10px] font-bold cursor-pointer flex items-center gap-1">`);
								_push(ssrRenderComponent(unref(CheckCircle2), { class: "h-3 w-3" }, null, _parent));
								_push(` Sajikan </button>`);
							} else _push(`<!---->`);
							_push(`</div></div>`);
						});
						_push(`<!--]--></div></div>`);
					});
					_push(`<!--]--></div>`);
				} else {
					_push(`<div class="h-[60vh] flex flex-col items-center justify-center text-center">`);
					_push(ssrRenderComponent(unref(CheckCircle2), { class: "h-12 w-12 text-slate-300 dark:text-slate-800 mb-3" }, null, _parent));
					_push(`<h3 class="text-base font-bold text-slate-450 dark:text-slate-500">Tidak ada antrean pesanan dapur</h3><p class="text-xs text-slate-400 mt-1">Dapur bersih! Semua hidangan telah disajikan.</p></div>`);
				}
				_push(`</div>`);
			} else if (activeTab.value === "item") {
				_push(`<div>`);
				if (activeItems.value.length > 0) {
					_push(`<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-6"><!--[-->`);
					ssrRenderList(activeItems.value, (item) => {
						_push(`<div class="bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800/80 rounded-2xl p-4 flex flex-col justify-between space-y-4 shadow-sm hover:border-slate-300 dark:hover:border-slate-700/80 transition-all relative overflow-hidden"><div class="${ssrRenderClass([[
							item.kitchen_status === "pending" ? "bg-rose-500" : "",
							item.kitchen_status === "cooking" ? "bg-sky-500" : "",
							item.kitchen_status === "ready" ? "bg-emerald-500" : ""
						], "absolute inset-y-0 left-0 w-1.5"])}"></div><div class="pl-2 space-y-2"><div class="flex items-center justify-between"><span class="text-[10px] font-extrabold uppercase px-2 py-0.5 border border-slate-200 dark:border-slate-800 rounded-md text-slate-500 dark:text-slate-400 bg-slate-50 dark:bg-slate-950">${ssrInterpolate(item.transaction?.order_type === "dine_in" ? "DINE IN" : "TAKE AWAY")}</span><span class="text-[10px] text-slate-400 dark:text-slate-500 font-bold flex items-center gap-1">`);
						_push(ssrRenderComponent(unref(Clock), { class: "h-3 w-3" }, null, _parent));
						_push(` ${ssrInterpolate(getElapsedMinutes(item.created_at))}</span></div><div class="flex items-baseline justify-between gap-1.5 pt-1"><span class="text-sm font-black text-slate-900 dark:text-white">${ssrInterpolate(item.transaction?.order_type === "dine_in" ? item.transaction?.table?.number : item.transaction?.queue_number || "Take Away")}</span><span class="text-[9px] font-bold text-slate-450 dark:text-slate-500 truncate max-w-[100px]"> #${ssrInterpolate(item.transaction?.transaction_number.slice(-6))}</span></div></div><div class="pl-2 flex-1 space-y-2.5"><div class="flex items-start justify-between gap-3"><div class="flex-1 space-y-1"><div class="font-extrabold text-sm text-slate-800 dark:text-white leading-tight">${ssrInterpolate(item.product?.name)}</div>`);
						if (item.variant) _push(`<div class="text-[9px] font-black uppercase tracking-wider text-[#8c5a3c]">${ssrInterpolate(item.variant)}</div>`);
						else _push(`<!---->`);
						_push(`</div><div class="text-lg font-black text-slate-900 dark:text-white bg-slate-50 dark:bg-slate-955 px-2.5 py-0.5 border border-slate-200 dark:border-slate-800 rounded-lg"> x${ssrInterpolate(item.qty)}</div></div>`);
						if (item.modifiers.length > 0) {
							_push(`<div class="space-y-1 pt-1.5 border-t border-slate-100 dark:border-slate-800/60"><div class="text-[8px] font-bold uppercase tracking-wider text-slate-455">Add-ons:</div><ul class="space-y-0.5 pl-1.5"><!--[-->`);
							ssrRenderList(item.modifiers, (m) => {
								_push(`<li class="text-[10px] font-bold text-slate-550 dark:text-slate-400 flex items-center gap-1.5"><span class="h-1 w-1 bg-amber-500 rounded-full"></span><span>${ssrInterpolate(m.modifier?.name)}</span></li>`);
							});
							_push(`<!--]--></ul></div>`);
						} else _push(`<!---->`);
						_push(`</div><div class="pl-2 pt-3 border-t border-slate-100 dark:border-slate-800/80">`);
						if (item.kitchen_status === "pending") {
							_push(`<button class="w-full py-2 bg-rose-600 hover:bg-rose-500 text-white rounded-xl text-xs font-bold transition-colors cursor-pointer flex items-center justify-center gap-1.5 shadow-md shadow-rose-900/10">`);
							_push(ssrRenderComponent(unref(Play), { class: "h-3.5 w-3.5 fill-current" }, null, _parent));
							_push(` Mulai Masak </button>`);
						} else if (item.kitchen_status === "cooking") {
							_push(`<button class="w-full py-2 bg-sky-600 hover:bg-sky-500 text-white rounded-xl text-xs font-bold transition-colors cursor-pointer flex items-center justify-center gap-1.5 shadow-md shadow-sky-900/10">`);
							_push(ssrRenderComponent(unref(Check), { class: "h-3.5 w-3.5" }, null, _parent));
							_push(` Selesai Masak </button>`);
						} else if (item.kitchen_status === "ready") {
							_push(`<button class="w-full py-2 bg-emerald-600 hover:bg-emerald-500 text-white rounded-xl text-xs font-bold transition-colors cursor-pointer flex items-center justify-center gap-1.5 shadow-md shadow-emerald-900/10">`);
							_push(ssrRenderComponent(unref(CheckCircle2), { class: "h-3.5 w-3.5" }, null, _parent));
							_push(` Sajikan Menu </button>`);
						} else _push(`<!---->`);
						_push(`</div></div>`);
					});
					_push(`<!--]--></div>`);
				} else {
					_push(`<div class="h-[60vh] flex flex-col items-center justify-center text-center">`);
					_push(ssrRenderComponent(unref(CheckCircle2), { class: "h-12 w-12 text-slate-300 dark:text-slate-800 mb-3" }, null, _parent));
					_push(`<h3 class="text-base font-bold text-slate-450 dark:text-slate-550">Tidak ada antrean pesanan dapur</h3><p class="text-xs text-slate-400 mt-1">Dapur bersih! Semua hidangan telah disajikan.</p></div>`);
				}
				_push(`</div>`);
			} else if (activeTab.value === "history") {
				_push(`<div>`);
				if (servedItems.value.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"><div class="overflow-x-auto"><table class="w-full text-left border-collapse"><thead><tr class="border-b border-slate-100 dark:border-slate-850 bg-slate-50/50 dark:bg-slate-950/50 text-[10px] font-bold text-slate-400 uppercase tracking-wider"><th class="px-6 py-3.5">No. Transaksi</th><th class="px-6 py-3.5">Tipe / Meja / Antrean</th><th class="px-6 py-3.5">Nama Menu</th><th class="px-6 py-3.5 text-center">Qty</th><th class="px-6 py-3.5">Add-ons</th><th class="px-6 py-3.5">Selesai Pada</th><th class="px-6 py-3.5 text-right">Tindakan</th></tr></thead><tbody class="divide-y divide-slate-100 dark:divide-slate-850 text-xs"><!--[-->`);
					ssrRenderList(servedItems.value, (item) => {
						_push(`<tr class="hover:bg-slate-50/50 dark:hover:bg-slate-950/20 font-semibold text-slate-700 dark:text-slate-300"><td class="px-6 py-4 text-slate-450"> #${ssrInterpolate(item.transaction?.transaction_number)}</td><td class="px-6 py-4"><div class="flex items-center gap-1.5"><span class="text-[9px] font-extrabold uppercase px-1.5 py-0.5 rounded border border-slate-200 dark:border-slate-800 bg-slate-50 dark:bg-slate-900 text-slate-555">${ssrInterpolate(item.transaction?.order_type)}</span><span class="font-bold text-slate-800 dark:text-white">${ssrInterpolate(item.transaction?.order_type === "dine_in" ? item.transaction?.table?.number : item.transaction?.queue_number || "Take Away")}</span></div></td><td class="px-6 py-4"><div class="font-bold text-slate-900 dark:text-white">${ssrInterpolate(item.product?.name)}</div>`);
						if (item.variant) _push(`<span class="text-[9px] font-black uppercase text-[#8c5a3c]">${ssrInterpolate(item.variant)}</span>`);
						else _push(`<!---->`);
						_push(`</td><td class="px-6 py-4 text-center font-extrabold text-slate-900 dark:text-white"> x${ssrInterpolate(item.qty)}</td><td class="px-6 py-4">`);
						if (item.modifiers.length === 0) _push(`<span class="text-slate-400">-</span>`);
						else {
							_push(`<div class="flex flex-wrap gap-1"><!--[-->`);
							ssrRenderList(item.modifiers, (m) => {
								_push(`<span class="px-1.5 py-0.5 rounded bg-slate-100 dark:bg-slate-850 text-[9px] text-slate-500">${ssrInterpolate(m.modifier?.name)}</span>`);
							});
							_push(`<!--]--></div>`);
						}
						_push(`</td><td class="px-6 py-4 text-slate-400">${ssrInterpolate(new Date(item.created_at).toLocaleString("id-ID", {
							hour: "2-digit",
							minute: "2-digit",
							second: "2-digit"
						}))}</td><td class="px-6 py-4 text-right"><button class="px-2.5 py-1 border border-[#8c5a3c]/30 hover:bg-[#8c5a3c]/10 text-[#8c5a3c] rounded-lg text-[10px] font-bold cursor-pointer transition-colors" title="Kembalikan ke antrean dapur jika terjadi kesalahan"> Panggil Kembali </button></td></tr>`);
					});
					_push(`<!--]--></tbody></table></div></div>`);
				} else {
					_push(`<div class="h-[60vh] flex flex-col items-center justify-center text-center">`);
					_push(ssrRenderComponent(unref(CheckCircle2), { class: "h-12 w-12 text-slate-200 dark:text-slate-800 mb-3" }, null, _parent));
					_push(`<h3 class="text-base font-bold text-slate-400">Belum ada riwayat order disajikan</h3><p class="text-xs text-slate-655 mt-1">Gunakan tombol &#39;Sajikan Menu&#39; pada tab antrean pesanan untuk melacak hari ini.</p></div>`);
				}
				_push(`</div>`);
			} else _push(`<!---->`);
			_push(`</main></div><!--]-->`);
		};
	}
});
//#endregion
//#region resources/js/Pages/CafePOS/Kds/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/Kds/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 };
