import { t as AdminLayout_default } from "./AdminLayout-DcKfAlG1.js";
import { a as printReceipt, i as isPrinting, n as getAvailablePrinters, o as printStatus, r as getPrintSettings, s as savePrintSettings, t as connectQZ } from "./printService-BpksXLUX.js";
import { Head, Link, router } from "@inertiajs/vue3";
import { Fragment, Transition, createBlock, createCommentVNode, createTextVNode, createVNode, defineComponent, onMounted, openBlock, ref, renderList, 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 { AlertTriangle, Calendar, Eye, FileText, Printer, Receipt, RefreshCw, Search, Settings, Store, Trash2, User, X } from "lucide-vue-next";
//#region resources/js/Pages/CafePOS/Transactions/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: {
		transactions: {},
		outlets: {},
		isCashier: { type: Boolean },
		filters: {}
	},
	setup(__props) {
		const props = __props;
		const search = ref(props.filters.search || "");
		const outletFilter = ref(props.filters.outlet_id || "");
		const dateFilter = ref(props.filters.date || "");
		let timeoutId = null;
		const applyFilters = () => {
			if (timeoutId) clearTimeout(timeoutId);
			timeoutId = setTimeout(() => {
				router.get(route("transactions.index"), {
					search: search.value,
					outlet_id: outletFilter.value,
					date: dateFilter.value
				}, {
					preserveState: true,
					replace: true
				});
			}, 400);
		};
		watch(search, applyFilters);
		watch(outletFilter, applyFilters);
		watch(dateFilter, applyFilters);
		const isDetailModalOpen = ref(false);
		const isVoidModalOpen = ref(false);
		const isDeleteModalOpen = ref(false);
		const selectedTxn = ref(null);
		const txnToVoid = ref(null);
		const txnToDelete = ref(null);
		const deliveryStatus = ref("pending");
		const openDetailModal = (txn) => {
			selectedTxn.value = txn;
			deliveryStatus.value = txn.delivery_status || "pending";
			isDetailModalOpen.value = true;
		};
		const updateTxnDeliveryStatus = () => {
			if (!selectedTxn.value) return;
			router.post(route("transactions.delivery-status", selectedTxn.value.id), { delivery_status: deliveryStatus.value }, {
				preserveScroll: true,
				onSuccess: () => {
					if (selectedTxn.value) selectedTxn.value.delivery_status = deliveryStatus.value;
				}
			});
		};
		const openVoidModal = (txn) => {
			txnToVoid.value = txn;
			isVoidModalOpen.value = true;
		};
		const openDeleteModal = (txn) => {
			txnToDelete.value = txn;
			isDeleteModalOpen.value = true;
		};
		const submitVoid = () => {
			if (!txnToVoid.value) return;
			router.post(route("transactions.void", txnToVoid.value.id), {}, { onSuccess: () => {
				isVoidModalOpen.value = false;
				txnToVoid.value = null;
				if (selectedTxn.value) selectedTxn.value.status = "cancelled";
			} });
		};
		const submitDelete = () => {
			if (!txnToDelete.value) return;
			router.delete(route("transactions.destroy", txnToDelete.value.id), { onSuccess: () => {
				isDeleteModalOpen.value = false;
				txnToDelete.value = null;
			} });
		};
		const formatDate = (dateStr) => {
			return new Date(dateStr).toLocaleString("id-ID", {
				year: "numeric",
				month: "short",
				day: "numeric",
				hour: "2-digit",
				minute: "2-digit",
				second: "2-digit"
			});
		};
		const handlePrint = async (txnId, type) => {
			if (isPrinting.value) return;
			const res = await printReceipt(txnId, type);
			if (res.error) alert(res.error);
		};
		const isPrinterSettingsOpen = ref(false);
		const printSettings = ref({
			method: "browser",
			posPrinter: "",
			kitchenPrinter: "",
			autoPrintPos: false,
			autoPrintKitchen: false
		});
		const availablePrinters = ref([]);
		const isConnectingQZ = ref(false);
		const qzConnectionStatus = ref("disconnected");
		onMounted(() => {
			printSettings.value = getPrintSettings();
			if (printSettings.value.method === "qz") checkQzConnection();
		});
		const checkQzConnection = async () => {
			isConnectingQZ.value = true;
			try {
				if (await connectQZ()) {
					qzConnectionStatus.value = "connected";
					availablePrinters.value = await getAvailablePrinters();
				} else {
					qzConnectionStatus.value = "disconnected";
					availablePrinters.value = [];
				}
			} catch (e) {
				qzConnectionStatus.value = "error";
				availablePrinters.value = [];
			} finally {
				isConnectingQZ.value = false;
			}
		};
		const saveSettings = () => {
			savePrintSettings(printSettings.value);
			isPrinterSettingsOpen.value = false;
			alert("Pengaturan printer berhasil disimpan.");
		};
		return (_ctx, _push, _parent, _attrs) => {
			_push(`<!--[-->`);
			_push(ssrRenderComponent(unref(Head), { title: "Transaction History" }, 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 sm:justify-between gap-4"${_scopeId}><div${_scopeId}><h1 class="text-2xl font-bold tracking-tight text-slate-900 dark:text-slate-50"${_scopeId}>Transaction History</h1><p class="text-sm text-slate-500 dark:text-slate-400 mt-1"${_scopeId}> Search and view receipt records, audit payments, and void mistaken cash entries. </p></div><button class="self-start sm:self-auto px-4 py-2 border border-slate-200 dark:border-slate-800 rounded-lg text-xs font-semibold hover:bg-slate-50 dark:hover:bg-slate-900 transition-colors cursor-pointer text-slate-700 dark:text-slate-300 flex items-center gap-1.5 animate-pulse"${_scopeId}>`);
						_push(ssrRenderComponent(unref(Settings), { class: "h-4 w-4 text-[#8c5a3c]" }, null, _parent, _scopeId));
						_push(`<span${_scopeId}>Pengaturan Printer</span></button></div><div class="bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-xl shadow-sm overflow-hidden"${_scopeId}><div class="p-5 border-b border-slate-200 dark:border-slate-800 flex flex-col md:flex-row items-center gap-4"${_scopeId}><div class="relative flex-1 w-full"${_scopeId}>`);
						_push(ssrRenderComponent(unref(Search), { class: "absolute left-3 top-2.5 h-4 w-4 text-slate-400" }, null, _parent, _scopeId));
						_push(`<input${ssrRenderAttr("value", search.value)} type="text" placeholder="Search by Transaction Number (TXN-...)" class="w-full pl-9 pr-4 py-2 border border-slate-200 dark:border-slate-800 rounded-lg bg-transparent text-sm focus:outline-none focus:ring-2 focus:ring-red-500/20 focus:border-red-500 transition-all text-slate-900 dark:text-slate-100"${_scopeId}></div>`);
						if (!__props.isCashier) {
							_push(`<div class="w-full md:w-48"${_scopeId}><select class="w-full px-3 py-2 border border-slate-200 dark:border-slate-800 rounded-lg bg-transparent text-sm focus:outline-none focus:ring-2 focus:ring-red-500/20 focus:border-red-500 text-slate-900 dark:text-slate-100"${_scopeId}><option value=""${ssrIncludeBooleanAttr(Array.isArray(outletFilter.value) ? ssrLooseContain(outletFilter.value, "") : ssrLooseEqual(outletFilter.value, "")) ? " selected" : ""}${_scopeId}>All Outlets</option><!--[-->`);
							ssrRenderList(__props.outlets, (ot) => {
								_push(`<option${ssrRenderAttr("value", String(ot.id))}${ssrIncludeBooleanAttr(Array.isArray(outletFilter.value) ? ssrLooseContain(outletFilter.value, String(ot.id)) : ssrLooseEqual(outletFilter.value, String(ot.id))) ? " selected" : ""}${_scopeId}>${ssrInterpolate(ot.name)}</option>`);
							});
							_push(`<!--]--></select></div>`);
						} else _push(`<!---->`);
						_push(`<div class="relative w-full md:w-48"${_scopeId}>`);
						_push(ssrRenderComponent(unref(Calendar), { class: "absolute left-3 top-2.5 h-4 w-4 text-slate-400 pointer-events-none" }, null, _parent, _scopeId));
						_push(`<input${ssrRenderAttr("value", dateFilter.value)} type="date" class="w-full pl-9 pr-3 py-2 border border-slate-200 dark:border-slate-800 rounded-lg bg-transparent text-sm focus:outline-none focus:ring-2 focus:ring-red-500/20 focus:border-red-500 text-slate-900 dark:text-slate-100"${_scopeId}></div></div><div class="overflow-x-auto"${_scopeId}><table class="w-full border-collapse text-left"${_scopeId}><thead${_scopeId}><tr class="border-b border-slate-200 dark:border-slate-800 bg-slate-50/50 dark:bg-slate-900/30"${_scopeId}><th class="p-4 text-xs font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400"${_scopeId}>TXN Code</th><th class="p-4 text-xs font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400"${_scopeId}>Date &amp; Time</th><th class="p-4 text-xs font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400"${_scopeId}>Outlet</th><th class="p-4 text-xs font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400"${_scopeId}>Operator</th><th class="p-4 text-xs font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400"${_scopeId}>Amount Paid</th><th class="p-4 text-xs font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400"${_scopeId}>Payment</th><th class="p-4 text-xs font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400"${_scopeId}>Status</th><th class="p-4 text-xs font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400 text-right"${_scopeId}>Actions</th></tr></thead><tbody class="divide-y divide-slate-200 dark:divide-slate-800"${_scopeId}>`);
						if (__props.transactions.data.length === 0) _push(`<tr${_scopeId}><td colspan="8" class="p-8 text-center text-sm text-slate-500 dark:text-slate-400"${_scopeId}> No transaction records found. </td></tr>`);
						else _push(`<!---->`);
						_push(`<!--[-->`);
						ssrRenderList(__props.transactions.data, (txn) => {
							_push(`<tr class="hover:bg-slate-50/50 dark:hover:bg-slate-900/10 transition-colors"${_scopeId}><td class="p-4 font-mono text-xs font-bold text-slate-900 dark:text-slate-100"${_scopeId}>${ssrInterpolate(txn.transaction_number)}</td><td class="p-4 text-xs text-slate-500 dark:text-slate-400"${_scopeId}>${ssrInterpolate(formatDate(txn.created_at))}</td><td class="p-4 text-xs text-slate-700 dark:text-slate-300"${_scopeId}><div class="flex items-center gap-1.5"${_scopeId}>`);
							_push(ssrRenderComponent(unref(Store), { class: "h-3.5 w-3.5 text-slate-450 flex-shrink-0" }, null, _parent, _scopeId));
							_push(`<span${_scopeId}>${ssrInterpolate(txn.outlet?.name)}</span></div></td><td class="p-4 text-xs text-slate-700 dark:text-slate-300"${_scopeId}><div class="flex items-center gap-1.5"${_scopeId}>`);
							_push(ssrRenderComponent(unref(User), { class: "h-3.5 w-3.5 text-slate-450 flex-shrink-0" }, null, _parent, _scopeId));
							_push(`<span${_scopeId}>${ssrInterpolate(txn.user?.name)}</span></div></td><td class="p-4 text-sm font-bold text-slate-900 dark:text-slate-100"${_scopeId}> Rp ${ssrInterpolate(Number(txn.total_amount).toLocaleString("id-ID"))}</td><td class="p-4 text-xs uppercase font-semibold text-slate-600 dark:text-slate-400"${_scopeId}>${ssrInterpolate(txn.payment_method)}</td><td class="p-4 text-xs"${_scopeId}><span class="${ssrRenderClass(["inline-flex px-2 py-0.5 rounded-full text-[10px] font-bold uppercase", txn.status === "success" ? "bg-emerald-50 dark:bg-emerald-95/30 text-emerald-700 dark:text-emerald-400" : "bg-rose-50 dark:bg-rose-95/30 text-rose-700 dark:text-rose-450"])}"${_scopeId}>${ssrInterpolate(txn.status === "success" ? "Success" : "Voided")}</span></td><td class="p-4 text-right"${_scopeId}><div class="flex items-center justify-end gap-1"${_scopeId}><a${ssrRenderAttr("href", _ctx.route("transactions.print", txn.id))} target="_blank" class="${ssrRenderClass([{ "opacity-50 pointer-events-none": unref(isPrinting) }, "p-1.5 rounded-lg hover:bg-slate-100 dark:hover:bg-slate-900 text-slate-500 dark:text-slate-400 hover:text-slate-800 cursor-pointer flex items-center justify-center"])}" title="Print POS Receipt"${_scopeId}>`);
							_push(ssrRenderComponent(unref(Printer), { class: "h-4 w-4" }, null, _parent, _scopeId));
							_push(`</a><a${ssrRenderAttr("href", _ctx.route("transactions.kitchen-print", txn.id))} target="_blank" class="${ssrRenderClass([{ "opacity-50 pointer-events-none": unref(isPrinting) }, "p-1.5 rounded-lg hover:bg-slate-100 dark:hover:bg-slate-900 text-slate-500 dark:text-slate-400 hover:text-[#8c5a3c] dark:hover:text-[#a17150] cursor-pointer flex items-center justify-center"])}" title="Print Kitchen Ticket"${_scopeId}>`);
							_push(ssrRenderComponent(unref(FileText), { class: "h-4 w-4" }, null, _parent, _scopeId));
							_push(`</a><button class="p-1.5 rounded-lg hover:bg-slate-100 dark:hover:bg-slate-900 text-slate-500 dark:text-slate-400 hover:text-slate-800 cursor-pointer" title="View Invoice Detail"${_scopeId}>`);
							_push(ssrRenderComponent(unref(Eye), { class: "h-4 w-4" }, null, _parent, _scopeId));
							_push(`</button>`);
							if (txn.status === "success") {
								_push(`<button class="p-1.5 rounded-lg hover:bg-rose-50 dark:hover:bg-rose-95/10 text-rose-500 hover:text-rose-600 cursor-pointer" title="Void Transaction"${_scopeId}>`);
								_push(ssrRenderComponent(unref(RefreshCw), { class: "h-4 w-4" }, null, _parent, _scopeId));
								_push(`</button>`);
							} else _push(`<!---->`);
							if (!__props.isCashier) {
								_push(`<button class="p-1.5 rounded-lg hover:bg-red-50 dark:hover:bg-red-95/10 text-red-600 hover:text-red-700 cursor-pointer" title="Delete Transaction"${_scopeId}>`);
								_push(ssrRenderComponent(unref(Trash2), { class: "h-4 w-4" }, null, _parent, _scopeId));
								_push(`</button>`);
							} else _push(`<!---->`);
							_push(`</div></td></tr>`);
						});
						_push(`<!--]--></tbody></table></div>`);
						if (__props.transactions.last_page > 1) {
							_push(`<div class="p-4 border-t border-slate-200 dark:border-slate-800 flex items-center justify-between"${_scopeId}><p class="text-xs text-slate-500"${_scopeId}>Showing ${ssrInterpolate(__props.transactions.data.length)} of ${ssrInterpolate(__props.transactions.total)} records</p><div class="flex gap-2"${_scopeId}>`);
							if (__props.transactions.prev_page_url) _push(ssrRenderComponent(unref(Link), {
								href: __props.transactions.prev_page_url,
								class: "px-3 py-1.5 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-lg text-xs font-semibold hover:bg-slate-50 dark:hover:bg-slate-800 transition-all text-slate-700 dark:text-slate-300 cursor-pointer"
							}, {
								default: withCtx((_, _push, _parent, _scopeId) => {
									if (_push) _push(` Previous `);
									else return [createTextVNode(" Previous ")];
								}),
								_: 1
							}, _parent, _scopeId));
							else _push(`<!---->`);
							if (__props.transactions.next_page_url) _push(ssrRenderComponent(unref(Link), {
								href: __props.transactions.next_page_url,
								class: "px-3 py-1.5 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-lg text-xs font-semibold hover:bg-slate-50 dark:hover:bg-slate-800 transition-all text-slate-700 dark:text-slate-300 cursor-pointer"
							}, {
								default: withCtx((_, _push, _parent, _scopeId) => {
									if (_push) _push(` Next `);
									else return [createTextVNode(" Next ")];
								}),
								_: 1
							}, _parent, _scopeId));
							else _push(`<!---->`);
							_push(`</div></div>`);
						} else _push(`<!---->`);
						_push(`</div></div>`);
						if (isDetailModalOpen.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="w-full max-w-md bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl overflow-hidden animate-in zoom-in-95 duration-200"${_scopeId}><div class="p-5 border-b border-slate-200 dark:border-slate-800 flex items-center justify-between"${_scopeId}><div class="flex items-center gap-2"${_scopeId}>`);
							_push(ssrRenderComponent(unref(Receipt), { class: "h-5 w-5 text-slate-500" }, null, _parent, _scopeId));
							_push(`<h3 class="text-md font-bold text-slate-900 dark:text-slate-50"${_scopeId}>Invoice Slip</h3></div><button class="p-1.5 hover:bg-slate-100 dark:hover:bg-slate-900 rounded-lg text-slate-500 cursor-pointer"${_scopeId}>`);
							_push(ssrRenderComponent(unref(X), { class: "h-5 w-5" }, null, _parent, _scopeId));
							_push(`</button></div><div class="p-6 space-y-6"${_scopeId}><div class="text-center space-y-1"${_scopeId}><h4 class="text-lg font-extrabold tracking-wider uppercase text-slate-900 dark:text-slate-50"${_scopeId}>${ssrInterpolate(_ctx.$page.props.settings.site_name)}</h4><p class="text-xs text-slate-500"${_scopeId}>${ssrInterpolate(selectedTxn.value?.outlet?.name)}</p><p class="text-[10px] text-slate-400"${_scopeId}>${ssrInterpolate(selectedTxn.value ? formatDate(selectedTxn.value.created_at) : "")}</p></div><div class="border-t border-b border-dashed border-slate-200 dark:border-slate-800 py-3 text-xs space-y-1.5 font-mono"${_scopeId}><div class="flex justify-between"${_scopeId}><span${_scopeId}>Invoice No:</span><span class="font-bold"${_scopeId}>${ssrInterpolate(selectedTxn.value?.transaction_number)}</span></div><div class="flex justify-between"${_scopeId}><span${_scopeId}>Order Type:</span><span class="font-bold uppercase text-[#8c5a3c]"${_scopeId}>${ssrInterpolate(selectedTxn.value?.order_type)}</span></div>`);
							if (selectedTxn.value?.order_type === "delivery") _push(`<div class="flex justify-between"${_scopeId}><span${_scopeId}>Kurir:</span><span class="font-bold"${_scopeId}>${ssrInterpolate(selectedTxn.value?.courier?.name || "Belum Ditugaskan")}</span></div>`);
							else _push(`<!---->`);
							if (selectedTxn.value?.order_type === "delivery") _push(`<div class="flex justify-between"${_scopeId}><span${_scopeId}>Status Delivery:</span><span class="font-bold uppercase text-orange-500"${_scopeId}>${ssrInterpolate(selectedTxn.value?.delivery_status)}</span></div>`);
							else _push(`<!---->`);
							_push(`<div class="flex justify-between"${_scopeId}><span${_scopeId}>Cashier:</span><span${_scopeId}>${ssrInterpolate(selectedTxn.value?.user?.name)}</span></div><div class="flex justify-between uppercase"${_scopeId}><span${_scopeId}>Payment Mode:</span><span${_scopeId}>${ssrInterpolate(selectedTxn.value?.payment_method)}</span></div><div class="flex justify-between"${_scopeId}><span${_scopeId}>Status:</span><span class="${ssrRenderClass([selectedTxn.value?.status === "success" ? "text-emerald-600" : "text-rose-500", "font-bold uppercase"])}"${_scopeId}>${ssrInterpolate(selectedTxn.value?.status)}</span></div></div>`);
							if (selectedTxn.value?.order_type === "delivery" && selectedTxn.value?.status === "success") _push(`<div class="p-3 border border-[#8c5a3c]/20 bg-[#8c5a3c]/5 rounded-xl space-y-2"${_scopeId}><label class="block text-[10px] font-bold text-slate-500 uppercase tracking-wider"${_scopeId}>Update Status Pengiriman</label><div class="flex gap-2"${_scopeId}><select class="flex-1 h-8 px-2 border border-slate-200 dark:border-slate-800 rounded-lg bg-white dark:bg-slate-900 text-xs font-semibold focus:outline-none focus:ring-1 focus:ring-[#8c5a3c]"${_scopeId}><option value="pending"${ssrIncludeBooleanAttr(Array.isArray(deliveryStatus.value) ? ssrLooseContain(deliveryStatus.value, "pending") : ssrLooseEqual(deliveryStatus.value, "pending")) ? " selected" : ""}${_scopeId}>Pending</option><option value="preparing"${ssrIncludeBooleanAttr(Array.isArray(deliveryStatus.value) ? ssrLooseContain(deliveryStatus.value, "preparing") : ssrLooseEqual(deliveryStatus.value, "preparing")) ? " selected" : ""}${_scopeId}>Preparing</option><option value="delivering"${ssrIncludeBooleanAttr(Array.isArray(deliveryStatus.value) ? ssrLooseContain(deliveryStatus.value, "delivering") : ssrLooseEqual(deliveryStatus.value, "delivering")) ? " selected" : ""}${_scopeId}>Delivering</option><option value="delivered"${ssrIncludeBooleanAttr(Array.isArray(deliveryStatus.value) ? ssrLooseContain(deliveryStatus.value, "delivered") : ssrLooseEqual(deliveryStatus.value, "delivered")) ? " selected" : ""}${_scopeId}>Delivered</option><option value="failed"${ssrIncludeBooleanAttr(Array.isArray(deliveryStatus.value) ? ssrLooseContain(deliveryStatus.value, "failed") : ssrLooseEqual(deliveryStatus.value, "failed")) ? " selected" : ""}${_scopeId}>Failed</option></select><button class="h-8 px-3 bg-[#8c5a3c] hover:bg-[#734a31] text-white text-xs font-bold rounded-lg cursor-pointer transition-colors"${_scopeId}> Update </button></div></div>`);
							else _push(`<!---->`);
							_push(`<div class="space-y-3 font-mono text-xs max-h-40 overflow-y-auto pr-1"${_scopeId}><!--[-->`);
							ssrRenderList(selectedTxn.value?.items, (item) => {
								_push(`<div class="flex justify-between items-start"${_scopeId}><div${_scopeId}><p class="font-bold"${_scopeId}>${ssrInterpolate(item.product?.name)}</p>`);
								if (item.variant) _push(`<span class="text-[10px] text-slate-400 uppercase"${_scopeId}>[${ssrInterpolate(item.variant)}]</span>`);
								else _push(`<!---->`);
								_push(`</div><span class="text-right flex-shrink-0 ml-4"${_scopeId}>${ssrInterpolate(item.qty)} x Rp${ssrInterpolate(Number(item.price).toLocaleString("id-ID"))}</span></div>`);
							});
							_push(`<!--]--></div><div class="border-t border-dashed border-slate-200 dark:border-slate-800 pt-3 space-y-1.5 font-mono text-xs"${_scopeId}><div class="flex justify-between"${_scopeId}><span${_scopeId}>Subtotal</span><span${_scopeId}>Rp ${ssrInterpolate((Number(selectedTxn.value?.total_amount) - Number(selectedTxn.value?.tax_amount) - Number(selectedTxn.value?.service_charge_amount)).toLocaleString("id-ID"))}</span></div>`);
							if (Number(selectedTxn.value?.service_charge_amount) > 0) _push(`<div class="flex justify-between"${_scopeId}><span${_scopeId}>Service Charge</span><span${_scopeId}>Rp ${ssrInterpolate(Number(selectedTxn.value?.service_charge_amount).toLocaleString("id-ID"))}</span></div>`);
							else _push(`<!---->`);
							if (Number(selectedTxn.value?.tax_amount) > 0) _push(`<div class="flex justify-between"${_scopeId}><span${_scopeId}>Tax</span><span${_scopeId}>Rp ${ssrInterpolate(Number(selectedTxn.value?.tax_amount).toLocaleString("id-ID"))}</span></div>`);
							else _push(`<!---->`);
							_push(`<div class="flex justify-between text-sm font-bold pt-1.5 border-t border-slate-200 dark:border-slate-800"${_scopeId}><span${_scopeId}>Grand Total</span><span${_scopeId}>Rp ${ssrInterpolate(Number(selectedTxn.value?.total_amount).toLocaleString("id-ID"))}</span></div></div></div><div class="p-5 border-t border-slate-200 dark:border-slate-800 bg-slate-50 dark:bg-slate-900/30 flex flex-col gap-3"${_scopeId}><div class="flex gap-2"${_scopeId}>`);
							if (selectedTxn.value) {
								_push(`<a${ssrRenderAttr("href", _ctx.route("transactions.print", selectedTxn.value.id))} target="_blank" class="${ssrRenderClass([{ "opacity-50 pointer-events-none": unref(isPrinting) }, "flex-1 py-2 bg-slate-100 dark:bg-slate-800 hover:bg-slate-200 dark:hover:bg-slate-700 text-slate-700 dark:text-slate-300 rounded-lg text-xs font-semibold shadow-sm text-center flex items-center justify-center gap-1.5 cursor-pointer"])}"${_scopeId}>`);
								_push(ssrRenderComponent(unref(Printer), { class: "h-3.5 w-3.5" }, null, _parent, _scopeId));
								_push(` Print Struk </a>`);
							} else _push(`<!---->`);
							if (selectedTxn.value) {
								_push(`<a${ssrRenderAttr("href", _ctx.route("transactions.kitchen-print", selectedTxn.value.id))} target="_blank" class="${ssrRenderClass([{ "opacity-50 pointer-events-none": unref(isPrinting) }, "flex-1 py-2 border border-slate-200 dark:border-slate-800 hover:bg-slate-50 dark:hover:bg-slate-900 text-[#8c5a3c] dark:text-[#a17150] rounded-lg text-xs font-semibold shadow-sm text-center flex items-center justify-center gap-1.5 cursor-pointer transition-colors"])}"${_scopeId}>`);
								_push(ssrRenderComponent(unref(FileText), { class: "h-3.5 w-3.5" }, null, _parent, _scopeId));
								_push(` Tiket Dapur </a>`);
							} else _push(`<!---->`);
							_push(`</div><div class="flex gap-2"${_scopeId}>`);
							if (selectedTxn.value?.status === "success") {
								_push(`<button class="flex-1 py-2 bg-rose-600 hover:bg-rose-500 text-white rounded-lg text-xs font-semibold shadow-sm focus:outline-none transition-all flex items-center justify-center gap-1 cursor-pointer"${_scopeId}>`);
								_push(ssrRenderComponent(unref(RefreshCw), { class: "h-3.5 w-3.5 animate-spin-reverse" }, null, _parent, _scopeId));
								_push(` Void Order </button>`);
							} else _push(`<!---->`);
							_push(`<button class="flex-1 py-2 border border-slate-200 dark:border-slate-800 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-900 rounded-lg text-xs font-semibold transition-all cursor-pointer text-center"${_scopeId}> Close </button></div></div></div></div>`);
						} else _push(`<!---->`);
						if (isVoidModalOpen.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="w-full max-w-md bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl p-6 animate-in zoom-in-95 duration-200 space-y-6"${_scopeId}><div class="flex items-center gap-3 text-rose-600 dark:text-rose-450"${_scopeId}>`);
							_push(ssrRenderComponent(unref(AlertTriangle), { class: "h-6 w-6 flex-shrink-0" }, null, _parent, _scopeId));
							_push(`<h3 class="text-lg font-bold"${_scopeId}>Void Transaction?</h3></div><p class="text-sm text-slate-500 dark:text-slate-400"${_scopeId}> Are you sure you want to void transaction <span class="font-bold text-slate-900 dark:text-slate-100"${_scopeId}>&quot;${ssrInterpolate(txnToVoid.value?.transaction_number)}&quot;</span>? This will cancel the order, mark it as Void, and **instantly restore all deducted stock levels (BOM ingredients / manual retail products)** in the outlet inventory. This action is irreversible. </p><div class="flex items-center justify-end gap-3"${_scopeId}><button class="px-4 py-2 border border-slate-200 dark:border-slate-800 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-900 rounded-lg text-sm font-semibold transition-all cursor-pointer"${_scopeId}> Cancel </button><button class="px-4 py-2 bg-rose-600 hover:bg-rose-500 text-white rounded-lg text-sm font-semibold transition-all cursor-pointer"${_scopeId}> Confirm Void </button></div></div></div>`);
						} else _push(`<!---->`);
						if (isDeleteModalOpen.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="w-full max-w-md bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl p-6 animate-in zoom-in-95 duration-200 space-y-6"${_scopeId}><div class="flex items-center gap-3 text-rose-600 dark:text-rose-450"${_scopeId}>`);
							_push(ssrRenderComponent(unref(AlertTriangle), { class: "h-6 w-6 flex-shrink-0" }, null, _parent, _scopeId));
							_push(`<h3 class="text-lg font-bold"${_scopeId}>Hapus Transaksi Permanen?</h3></div><p class="text-sm text-slate-500 dark:text-slate-400 font-sans"${_scopeId}> Apakah Anda yakin ingin menghapus transaksi <span class="font-bold text-slate-900 dark:text-slate-100"${_scopeId}>&quot;${ssrInterpolate(txnToDelete.value?.transaction_number)}&quot;</span> secara permanen dari database? <br${_scopeId}><br${_scopeId}>`);
							if (txnToDelete.value?.status !== "cancelled") _push(`<span class="text-rose-500 font-bold block"${_scopeId}> ⚠️ PENTING: Karena status transaksi ini masih aktif (SUKSES), stok bahan baku (BOM) / produk retail yang terpotong akan DIKEMBALIKAN (REVERT) secara otomatis ke dalam inventori! </span>`);
							else _push(`<span class="text-slate-500 block"${_scopeId}> Catatan: Karena transaksi ini sudah di-void (dibatalkan), stok telah dikembalikan sebelumnya dan tidak akan disesuaikan lagi. </span>`);
							_push(`</p><div class="flex items-center justify-end gap-3 font-sans"${_scopeId}><button class="px-4 py-2 border border-slate-200 dark:border-slate-800 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-900 rounded-lg text-sm font-semibold transition-all cursor-pointer"${_scopeId}> Batal </button><button class="px-4 py-2 bg-rose-600 hover:bg-rose-500 text-white rounded-lg text-sm font-semibold transition-all cursor-pointer"${_scopeId}> Hapus Transaksi </button></div></div></div>`);
						} else _push(`<!---->`);
						if (isPrinterSettingsOpen.value) {
							_push(`<div class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-950/65 backdrop-blur-sm animate-in fade-in duration-150"${_scopeId}><div class="bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl w-full max-w-md overflow-hidden flex flex-col 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 flex items-center gap-2"${_scopeId}>`);
							_push(ssrRenderComponent(unref(Settings), { class: "h-4 w-4 text-[#8c5a3c]" }, null, _parent, _scopeId));
							_push(`<span${_scopeId}>Pengaturan Printer POS</span></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><div class="p-6 space-y-4 max-h-[70vh] overflow-y-auto font-sans"${_scopeId}><div class="space-y-1.5"${_scopeId}><label class="block text-xs font-bold text-slate-650 dark:text-slate-350"${_scopeId}>Metode Pencetakan</label><select class="w-full px-3 py-2 text-xs border border-slate-200 dark:border-slate-800 rounded-lg bg-transparent focus:outline-none focus:ring-1 focus:ring-[#8c5a3c] text-slate-850 dark:text-slate-150"${_scopeId}><option value="browser"${ssrIncludeBooleanAttr(Array.isArray(printSettings.value.method) ? ssrLooseContain(printSettings.value.method, "browser") : ssrLooseEqual(printSettings.value.method, "browser")) ? " selected" : ""}${_scopeId}>Browser Print (Buka Tab Baru)</option><option value="qz"${ssrIncludeBooleanAttr(Array.isArray(printSettings.value.method) ? ssrLooseContain(printSettings.value.method, "qz") : ssrLooseEqual(printSettings.value.method, "qz")) ? " selected" : ""}${_scopeId}>QZ Tray (Cetak Otomatis / Silent)</option></select></div>`);
							if (printSettings.value.method === "qz") {
								_push(`<div class="p-3 bg-slate-50 dark:bg-slate-900/30 border border-slate-200 dark:border-slate-800 rounded-xl space-y-3"${_scopeId}><div class="flex items-center justify-between"${_scopeId}><span class="text-[10px] font-bold uppercase tracking-wider text-slate-400"${_scopeId}>Status QZ Tray</span><span class="${ssrRenderClass(["inline-flex px-2 py-0.5 rounded-full text-[9px] font-bold uppercase", qzConnectionStatus.value === "connected" ? "bg-emerald-50 dark:bg-emerald-95/30 text-emerald-700" : "bg-rose-50 dark:bg-rose-95/30 text-rose-700"])}"${_scopeId}>${ssrInterpolate(qzConnectionStatus.value === "connected" ? "Terhubung" : "Terputus")}</span></div><button type="button"${ssrIncludeBooleanAttr(isConnectingQZ.value) ? " disabled" : ""} class="w-full py-1.5 border border-slate-200 dark:border-slate-800 hover:bg-slate-100 dark:hover:bg-slate-900 text-slate-700 dark:text-slate-300 text-xs font-bold rounded-lg transition-colors cursor-pointer flex items-center justify-center gap-1.5 disabled:opacity-50"${_scopeId}>`);
								_push(ssrRenderComponent(unref(RefreshCw), { class: ["h-3 w-3", { "animate-spin": isConnectingQZ.value }] }, null, _parent, _scopeId));
								_push(`<span${_scopeId}>Hubungkan Ulang / Cek Koneksi</span></button></div>`);
							} else _push(`<!---->`);
							if (printSettings.value.method === "qz") {
								_push(`<div class="space-y-3"${_scopeId}><div class="space-y-1.5"${_scopeId}><label class="block text-xs font-bold text-slate-650 dark:text-slate-350"${_scopeId}>Printer Kasir (Struk)</label>`);
								if (availablePrinters.value.length > 0) {
									_push(`<select class="w-full px-3 py-2 text-xs border border-slate-200 dark:border-slate-800 rounded-lg bg-transparent focus:outline-none focus:ring-1 focus:ring-[#8c5a3c] text-slate-850 dark:text-slate-150"${_scopeId}><option value=""${ssrIncludeBooleanAttr(Array.isArray(printSettings.value.posPrinter) ? ssrLooseContain(printSettings.value.posPrinter, "") : ssrLooseEqual(printSettings.value.posPrinter, "")) ? " selected" : ""}${_scopeId}>-- Pilih Printer Kasir --</option><!--[-->`);
									ssrRenderList(availablePrinters.value, (printer) => {
										_push(`<option${ssrRenderAttr("value", printer)}${ssrIncludeBooleanAttr(Array.isArray(printSettings.value.posPrinter) ? ssrLooseContain(printSettings.value.posPrinter, printer) : ssrLooseEqual(printSettings.value.posPrinter, printer)) ? " selected" : ""}${_scopeId}>${ssrInterpolate(printer)}</option>`);
									});
									_push(`<!--]--></select>`);
								} else _push(`<input${ssrRenderAttr("value", printSettings.value.posPrinter)} type="text" placeholder="Masukkan nama printer (e.g. POS-58)" class="w-full px-3 py-2 text-xs border border-slate-200 dark:border-slate-800 rounded-lg bg-transparent focus:outline-none focus:ring-1 focus:ring-[#8c5a3c] text-slate-850 dark:text-slate-150"${_scopeId}>`);
								_push(`</div><div class="space-y-1.5"${_scopeId}><label class="block text-xs font-bold text-slate-650 dark:text-slate-350"${_scopeId}>Printer Dapur (Tiket)</label>`);
								if (availablePrinters.value.length > 0) {
									_push(`<select class="w-full px-3 py-2 text-xs border border-slate-200 dark:border-slate-800 rounded-lg bg-transparent focus:outline-none focus:ring-1 focus:ring-[#8c5a3c] text-slate-850 dark:text-slate-150"${_scopeId}><option value=""${ssrIncludeBooleanAttr(Array.isArray(printSettings.value.kitchenPrinter) ? ssrLooseContain(printSettings.value.kitchenPrinter, "") : ssrLooseEqual(printSettings.value.kitchenPrinter, "")) ? " selected" : ""}${_scopeId}>-- Pilih Printer Dapur --</option><!--[-->`);
									ssrRenderList(availablePrinters.value, (printer) => {
										_push(`<option${ssrRenderAttr("value", printer)}${ssrIncludeBooleanAttr(Array.isArray(printSettings.value.kitchenPrinter) ? ssrLooseContain(printSettings.value.kitchenPrinter, printer) : ssrLooseEqual(printSettings.value.kitchenPrinter, printer)) ? " selected" : ""}${_scopeId}>${ssrInterpolate(printer)}</option>`);
									});
									_push(`<!--]--></select>`);
								} else _push(`<input${ssrRenderAttr("value", printSettings.value.kitchenPrinter)} type="text" placeholder="Masukkan nama printer (e.g. Kitchen-Printer)" class="w-full px-3 py-2 text-xs border border-slate-200 dark:border-slate-800 rounded-lg bg-transparent focus:outline-none focus:ring-1 focus:ring-[#8c5a3c] text-slate-850 dark:text-slate-150"${_scopeId}>`);
								_push(`</div></div>`);
							} else _push(`<!---->`);
							_push(`</div><div class="px-6 py-4 border-t border-slate-200 dark:border-slate-800 bg-slate-50 dark:bg-slate-900/30 flex items-center justify-end gap-3"${_scopeId}><button type="button" class="px-4 py-2 border border-slate-200 dark:border-slate-800 text-slate-700 dark:text-slate-300 text-xs font-bold rounded-xl hover:bg-slate-50 dark:hover:bg-slate-900 transition-colors cursor-pointer"${_scopeId}> Batal </button><button type="button" class="px-4 py-2 bg-[#8c5a3c] hover:bg-[#734a31] text-white text-xs font-bold rounded-xl cursor-pointer"${_scopeId}> Simpan Pengaturan </button></div></div></div>`);
						} else _push(`<!---->`);
						_push(``);
						if (unref(isPrinting)) {
							_push(`<div class="fixed inset-0 z-[200] flex items-center justify-center p-4 bg-slate-950/65 backdrop-blur-md"${_scopeId}><div class="bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl p-6 w-full max-w-sm text-center space-y-4 transform transition-all"${_scopeId}><div class="relative w-16 h-16 mx-auto flex items-center justify-center"${_scopeId}><div class="absolute inset-0 rounded-full border-4 border-slate-100 dark:border-slate-900"${_scopeId}></div><div class="absolute inset-0 rounded-full border-4 border-t-[#8c5a3c] dark:border-t-[#8c5a3c] animate-spin"${_scopeId}></div>`);
							_push(ssrRenderComponent(unref(Printer), { class: "h-6 w-6 text-[#8c5a3c]" }, null, _parent, _scopeId));
							_push(`</div><div class="space-y-1"${_scopeId}><h3 class="text-sm font-bold text-slate-900 dark:text-slate-100"${_scopeId}> Sedang Mencetak Struk </h3><p class="text-xs text-slate-500 dark:text-slate-400 animate-pulse font-medium"${_scopeId}>${ssrInterpolate(unref(printStatus) || "Menghubungkan ke printer...")}</p></div></div></div>`);
						} else _push(`<!---->`);
					} else return [
						createVNode("div", { class: "space-y-6" }, [createVNode("div", { class: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4" }, [createVNode("div", null, [createVNode("h1", { class: "text-2xl font-bold tracking-tight text-slate-900 dark:text-slate-50" }, "Transaction History"), createVNode("p", { class: "text-sm text-slate-500 dark:text-slate-400 mt-1" }, " Search and view receipt records, audit payments, and void mistaken cash entries. ")]), createVNode("button", {
							onClick: ($event) => isPrinterSettingsOpen.value = true,
							class: "self-start sm:self-auto px-4 py-2 border border-slate-200 dark:border-slate-800 rounded-lg text-xs font-semibold hover:bg-slate-50 dark:hover:bg-slate-900 transition-colors cursor-pointer text-slate-700 dark:text-slate-300 flex items-center gap-1.5 animate-pulse"
						}, [createVNode(unref(Settings), { class: "h-4 w-4 text-[#8c5a3c]" }), createVNode("span", null, "Pengaturan Printer")], 8, ["onClick"])]), createVNode("div", { class: "bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-xl shadow-sm overflow-hidden" }, [
							createVNode("div", { class: "p-5 border-b border-slate-200 dark:border-slate-800 flex flex-col md:flex-row items-center gap-4" }, [
								createVNode("div", { class: "relative flex-1 w-full" }, [createVNode(unref(Search), { class: "absolute left-3 top-2.5 h-4 w-4 text-slate-400" }), withDirectives(createVNode("input", {
									"onUpdate:modelValue": ($event) => search.value = $event,
									type: "text",
									placeholder: "Search by Transaction Number (TXN-...)",
									class: "w-full pl-9 pr-4 py-2 border border-slate-200 dark:border-slate-800 rounded-lg bg-transparent text-sm focus:outline-none focus:ring-2 focus:ring-red-500/20 focus:border-red-500 transition-all text-slate-900 dark:text-slate-100"
								}, null, 8, ["onUpdate:modelValue"]), [[vModelText, search.value]])]),
								!__props.isCashier ? (openBlock(), createBlock("div", {
									key: 0,
									class: "w-full md:w-48"
								}, [withDirectives(createVNode("select", {
									"onUpdate:modelValue": ($event) => outletFilter.value = $event,
									class: "w-full px-3 py-2 border border-slate-200 dark:border-slate-800 rounded-lg bg-transparent text-sm focus:outline-none focus:ring-2 focus:ring-red-500/20 focus:border-red-500 text-slate-900 dark:text-slate-100"
								}, [createVNode("option", { value: "" }, "All Outlets"), (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, outletFilter.value]])])) : createCommentVNode("", true),
								createVNode("div", { class: "relative w-full md:w-48" }, [createVNode(unref(Calendar), { class: "absolute left-3 top-2.5 h-4 w-4 text-slate-400 pointer-events-none" }), withDirectives(createVNode("input", {
									"onUpdate:modelValue": ($event) => dateFilter.value = $event,
									type: "date",
									class: "w-full pl-9 pr-3 py-2 border border-slate-200 dark:border-slate-800 rounded-lg bg-transparent text-sm focus:outline-none focus:ring-2 focus:ring-red-500/20 focus:border-red-500 text-slate-900 dark:text-slate-100"
								}, null, 8, ["onUpdate:modelValue"]), [[vModelText, dateFilter.value]])])
							]),
							createVNode("div", { class: "overflow-x-auto" }, [createVNode("table", { class: "w-full border-collapse text-left" }, [createVNode("thead", null, [createVNode("tr", { class: "border-b border-slate-200 dark:border-slate-800 bg-slate-50/50 dark:bg-slate-900/30" }, [
								createVNode("th", { class: "p-4 text-xs font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400" }, "TXN Code"),
								createVNode("th", { class: "p-4 text-xs font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400" }, "Date & Time"),
								createVNode("th", { class: "p-4 text-xs font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400" }, "Outlet"),
								createVNode("th", { class: "p-4 text-xs font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400" }, "Operator"),
								createVNode("th", { class: "p-4 text-xs font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400" }, "Amount Paid"),
								createVNode("th", { class: "p-4 text-xs font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400" }, "Payment"),
								createVNode("th", { class: "p-4 text-xs font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400" }, "Status"),
								createVNode("th", { class: "p-4 text-xs font-semibold uppercase tracking-wider text-slate-500 dark:text-slate-400 text-right" }, "Actions")
							])]), createVNode("tbody", { class: "divide-y divide-slate-200 dark:divide-slate-800" }, [__props.transactions.data.length === 0 ? (openBlock(), createBlock("tr", { key: 0 }, [createVNode("td", {
								colspan: "8",
								class: "p-8 text-center text-sm text-slate-500 dark:text-slate-400"
							}, " No transaction records found. ")])) : createCommentVNode("", true), (openBlock(true), createBlock(Fragment, null, renderList(__props.transactions.data, (txn) => {
								return openBlock(), createBlock("tr", {
									key: txn.id,
									class: "hover:bg-slate-50/50 dark:hover:bg-slate-900/10 transition-colors"
								}, [
									createVNode("td", { class: "p-4 font-mono text-xs font-bold text-slate-900 dark:text-slate-100" }, toDisplayString(txn.transaction_number), 1),
									createVNode("td", { class: "p-4 text-xs text-slate-500 dark:text-slate-400" }, toDisplayString(formatDate(txn.created_at)), 1),
									createVNode("td", { class: "p-4 text-xs text-slate-700 dark:text-slate-300" }, [createVNode("div", { class: "flex items-center gap-1.5" }, [createVNode(unref(Store), { class: "h-3.5 w-3.5 text-slate-450 flex-shrink-0" }), createVNode("span", null, toDisplayString(txn.outlet?.name), 1)])]),
									createVNode("td", { class: "p-4 text-xs text-slate-700 dark:text-slate-300" }, [createVNode("div", { class: "flex items-center gap-1.5" }, [createVNode(unref(User), { class: "h-3.5 w-3.5 text-slate-450 flex-shrink-0" }), createVNode("span", null, toDisplayString(txn.user?.name), 1)])]),
									createVNode("td", { class: "p-4 text-sm font-bold text-slate-900 dark:text-slate-100" }, " Rp " + toDisplayString(Number(txn.total_amount).toLocaleString("id-ID")), 1),
									createVNode("td", { class: "p-4 text-xs uppercase font-semibold text-slate-600 dark:text-slate-400" }, toDisplayString(txn.payment_method), 1),
									createVNode("td", { class: "p-4 text-xs" }, [createVNode("span", { class: ["inline-flex px-2 py-0.5 rounded-full text-[10px] font-bold uppercase", txn.status === "success" ? "bg-emerald-50 dark:bg-emerald-95/30 text-emerald-700 dark:text-emerald-400" : "bg-rose-50 dark:bg-rose-95/30 text-rose-700 dark:text-rose-450"] }, toDisplayString(txn.status === "success" ? "Success" : "Voided"), 3)]),
									createVNode("td", { class: "p-4 text-right" }, [createVNode("div", { class: "flex items-center justify-end gap-1" }, [
										createVNode("a", {
											href: _ctx.route("transactions.print", txn.id),
											onClick: withModifiers(($event) => handlePrint(txn.id, "pos"), ["prevent"]),
											target: "_blank",
											class: [{ "opacity-50 pointer-events-none": unref(isPrinting) }, "p-1.5 rounded-lg hover:bg-slate-100 dark:hover:bg-slate-900 text-slate-500 dark:text-slate-400 hover:text-slate-800 cursor-pointer flex items-center justify-center"],
											title: "Print POS Receipt"
										}, [createVNode(unref(Printer), { class: "h-4 w-4" })], 10, ["href", "onClick"]),
										createVNode("a", {
											href: _ctx.route("transactions.kitchen-print", txn.id),
											onClick: withModifiers(($event) => handlePrint(txn.id, "kitchen"), ["prevent"]),
											target: "_blank",
											class: [{ "opacity-50 pointer-events-none": unref(isPrinting) }, "p-1.5 rounded-lg hover:bg-slate-100 dark:hover:bg-slate-900 text-slate-500 dark:text-slate-400 hover:text-[#8c5a3c] dark:hover:text-[#a17150] cursor-pointer flex items-center justify-center"],
											title: "Print Kitchen Ticket"
										}, [createVNode(unref(FileText), { class: "h-4 w-4" })], 10, ["href", "onClick"]),
										createVNode("button", {
											onClick: ($event) => openDetailModal(txn),
											class: "p-1.5 rounded-lg hover:bg-slate-100 dark:hover:bg-slate-900 text-slate-500 dark:text-slate-400 hover:text-slate-800 cursor-pointer",
											title: "View Invoice Detail"
										}, [createVNode(unref(Eye), { class: "h-4 w-4" })], 8, ["onClick"]),
										txn.status === "success" ? (openBlock(), createBlock("button", {
											key: 0,
											onClick: ($event) => openVoidModal(txn),
											class: "p-1.5 rounded-lg hover:bg-rose-50 dark:hover:bg-rose-95/10 text-rose-500 hover:text-rose-600 cursor-pointer",
											title: "Void Transaction"
										}, [createVNode(unref(RefreshCw), { class: "h-4 w-4" })], 8, ["onClick"])) : createCommentVNode("", true),
										!__props.isCashier ? (openBlock(), createBlock("button", {
											key: 1,
											onClick: ($event) => openDeleteModal(txn),
											class: "p-1.5 rounded-lg hover:bg-red-50 dark:hover:bg-red-95/10 text-red-600 hover:text-red-700 cursor-pointer",
											title: "Delete Transaction"
										}, [createVNode(unref(Trash2), { class: "h-4 w-4" })], 8, ["onClick"])) : createCommentVNode("", true)
									])])
								]);
							}), 128))])])]),
							__props.transactions.last_page > 1 ? (openBlock(), createBlock("div", {
								key: 0,
								class: "p-4 border-t border-slate-200 dark:border-slate-800 flex items-center justify-between"
							}, [createVNode("p", { class: "text-xs text-slate-500" }, "Showing " + toDisplayString(__props.transactions.data.length) + " of " + toDisplayString(__props.transactions.total) + " records", 1), createVNode("div", { class: "flex gap-2" }, [__props.transactions.prev_page_url ? (openBlock(), createBlock(unref(Link), {
								key: 0,
								href: __props.transactions.prev_page_url,
								class: "px-3 py-1.5 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-lg text-xs font-semibold hover:bg-slate-50 dark:hover:bg-slate-800 transition-all text-slate-700 dark:text-slate-300 cursor-pointer"
							}, {
								default: withCtx(() => [createTextVNode(" Previous ")]),
								_: 1
							}, 8, ["href"])) : createCommentVNode("", true), __props.transactions.next_page_url ? (openBlock(), createBlock(unref(Link), {
								key: 1,
								href: __props.transactions.next_page_url,
								class: "px-3 py-1.5 bg-white dark:bg-slate-900 border border-slate-200 dark:border-slate-800 rounded-lg text-xs font-semibold hover:bg-slate-50 dark:hover:bg-slate-800 transition-all text-slate-700 dark:text-slate-300 cursor-pointer"
							}, {
								default: withCtx(() => [createTextVNode(" Next ")]),
								_: 1
							}, 8, ["href"])) : createCommentVNode("", true)])])) : createCommentVNode("", true)
						])]),
						isDetailModalOpen.value ? (openBlock(), createBlock("div", {
							key: 0,
							class: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-950/60 backdrop-blur-sm"
						}, [createVNode("div", { class: "w-full max-w-md bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl overflow-hidden animate-in zoom-in-95 duration-200" }, [
							createVNode("div", { class: "p-5 border-b border-slate-200 dark:border-slate-800 flex items-center justify-between" }, [createVNode("div", { class: "flex items-center gap-2" }, [createVNode(unref(Receipt), { class: "h-5 w-5 text-slate-500" }), createVNode("h3", { class: "text-md font-bold text-slate-900 dark:text-slate-50" }, "Invoice Slip")]), createVNode("button", {
								onClick: ($event) => isDetailModalOpen.value = false,
								class: "p-1.5 hover:bg-slate-100 dark:hover:bg-slate-900 rounded-lg text-slate-500 cursor-pointer"
							}, [createVNode(unref(X), { class: "h-5 w-5" })], 8, ["onClick"])]),
							createVNode("div", { class: "p-6 space-y-6" }, [
								createVNode("div", { class: "text-center space-y-1" }, [
									createVNode("h4", { class: "text-lg font-extrabold tracking-wider uppercase text-slate-900 dark:text-slate-50" }, toDisplayString(_ctx.$page.props.settings.site_name), 1),
									createVNode("p", { class: "text-xs text-slate-500" }, toDisplayString(selectedTxn.value?.outlet?.name), 1),
									createVNode("p", { class: "text-[10px] text-slate-400" }, toDisplayString(selectedTxn.value ? formatDate(selectedTxn.value.created_at) : ""), 1)
								]),
								createVNode("div", { class: "border-t border-b border-dashed border-slate-200 dark:border-slate-800 py-3 text-xs space-y-1.5 font-mono" }, [
									createVNode("div", { class: "flex justify-between" }, [createVNode("span", null, "Invoice No:"), createVNode("span", { class: "font-bold" }, toDisplayString(selectedTxn.value?.transaction_number), 1)]),
									createVNode("div", { class: "flex justify-between" }, [createVNode("span", null, "Order Type:"), createVNode("span", { class: "font-bold uppercase text-[#8c5a3c]" }, toDisplayString(selectedTxn.value?.order_type), 1)]),
									selectedTxn.value?.order_type === "delivery" ? (openBlock(), createBlock("div", {
										key: 0,
										class: "flex justify-between"
									}, [createVNode("span", null, "Kurir:"), createVNode("span", { class: "font-bold" }, toDisplayString(selectedTxn.value?.courier?.name || "Belum Ditugaskan"), 1)])) : createCommentVNode("", true),
									selectedTxn.value?.order_type === "delivery" ? (openBlock(), createBlock("div", {
										key: 1,
										class: "flex justify-between"
									}, [createVNode("span", null, "Status Delivery:"), createVNode("span", { class: "font-bold uppercase text-orange-500" }, toDisplayString(selectedTxn.value?.delivery_status), 1)])) : createCommentVNode("", true),
									createVNode("div", { class: "flex justify-between" }, [createVNode("span", null, "Cashier:"), createVNode("span", null, toDisplayString(selectedTxn.value?.user?.name), 1)]),
									createVNode("div", { class: "flex justify-between uppercase" }, [createVNode("span", null, "Payment Mode:"), createVNode("span", null, toDisplayString(selectedTxn.value?.payment_method), 1)]),
									createVNode("div", { class: "flex justify-between" }, [createVNode("span", null, "Status:"), createVNode("span", { class: ["font-bold uppercase", selectedTxn.value?.status === "success" ? "text-emerald-600" : "text-rose-500"] }, toDisplayString(selectedTxn.value?.status), 3)])
								]),
								selectedTxn.value?.order_type === "delivery" && selectedTxn.value?.status === "success" ? (openBlock(), createBlock("div", {
									key: 0,
									class: "p-3 border border-[#8c5a3c]/20 bg-[#8c5a3c]/5 rounded-xl space-y-2"
								}, [createVNode("label", { class: "block text-[10px] font-bold text-slate-500 uppercase tracking-wider" }, "Update Status Pengiriman"), createVNode("div", { class: "flex gap-2" }, [withDirectives(createVNode("select", {
									"onUpdate:modelValue": ($event) => deliveryStatus.value = $event,
									class: "flex-1 h-8 px-2 border border-slate-200 dark:border-slate-800 rounded-lg bg-white dark:bg-slate-900 text-xs font-semibold focus:outline-none focus:ring-1 focus:ring-[#8c5a3c]"
								}, [
									createVNode("option", { value: "pending" }, "Pending"),
									createVNode("option", { value: "preparing" }, "Preparing"),
									createVNode("option", { value: "delivering" }, "Delivering"),
									createVNode("option", { value: "delivered" }, "Delivered"),
									createVNode("option", { value: "failed" }, "Failed")
								], 8, ["onUpdate:modelValue"]), [[vModelSelect, deliveryStatus.value]]), createVNode("button", {
									onClick: updateTxnDeliveryStatus,
									class: "h-8 px-3 bg-[#8c5a3c] hover:bg-[#734a31] text-white text-xs font-bold rounded-lg cursor-pointer transition-colors"
								}, " Update ")])])) : createCommentVNode("", true),
								createVNode("div", { class: "space-y-3 font-mono text-xs max-h-40 overflow-y-auto pr-1" }, [(openBlock(true), createBlock(Fragment, null, renderList(selectedTxn.value?.items, (item) => {
									return openBlock(), createBlock("div", {
										key: item.id,
										class: "flex justify-between items-start"
									}, [createVNode("div", null, [createVNode("p", { class: "font-bold" }, toDisplayString(item.product?.name), 1), item.variant ? (openBlock(), createBlock("span", {
										key: 0,
										class: "text-[10px] text-slate-400 uppercase"
									}, "[" + toDisplayString(item.variant) + "]", 1)) : createCommentVNode("", true)]), createVNode("span", { class: "text-right flex-shrink-0 ml-4" }, toDisplayString(item.qty) + " x Rp" + toDisplayString(Number(item.price).toLocaleString("id-ID")), 1)]);
								}), 128))]),
								createVNode("div", { class: "border-t border-dashed border-slate-200 dark:border-slate-800 pt-3 space-y-1.5 font-mono text-xs" }, [
									createVNode("div", { class: "flex justify-between" }, [createVNode("span", null, "Subtotal"), createVNode("span", null, "Rp " + toDisplayString((Number(selectedTxn.value?.total_amount) - Number(selectedTxn.value?.tax_amount) - Number(selectedTxn.value?.service_charge_amount)).toLocaleString("id-ID")), 1)]),
									Number(selectedTxn.value?.service_charge_amount) > 0 ? (openBlock(), createBlock("div", {
										key: 0,
										class: "flex justify-between"
									}, [createVNode("span", null, "Service Charge"), createVNode("span", null, "Rp " + toDisplayString(Number(selectedTxn.value?.service_charge_amount).toLocaleString("id-ID")), 1)])) : createCommentVNode("", true),
									Number(selectedTxn.value?.tax_amount) > 0 ? (openBlock(), createBlock("div", {
										key: 1,
										class: "flex justify-between"
									}, [createVNode("span", null, "Tax"), createVNode("span", null, "Rp " + toDisplayString(Number(selectedTxn.value?.tax_amount).toLocaleString("id-ID")), 1)])) : createCommentVNode("", true),
									createVNode("div", { class: "flex justify-between text-sm font-bold pt-1.5 border-t border-slate-200 dark:border-slate-800" }, [createVNode("span", null, "Grand Total"), createVNode("span", null, "Rp " + toDisplayString(Number(selectedTxn.value?.total_amount).toLocaleString("id-ID")), 1)])
								])
							]),
							createVNode("div", { class: "p-5 border-t border-slate-200 dark:border-slate-800 bg-slate-50 dark:bg-slate-900/30 flex flex-col gap-3" }, [createVNode("div", { class: "flex gap-2" }, [selectedTxn.value ? (openBlock(), createBlock("a", {
								key: 0,
								href: _ctx.route("transactions.print", selectedTxn.value.id),
								onClick: withModifiers(($event) => handlePrint(selectedTxn.value.id, "pos"), ["prevent"]),
								target: "_blank",
								class: [{ "opacity-50 pointer-events-none": unref(isPrinting) }, "flex-1 py-2 bg-slate-100 dark:bg-slate-800 hover:bg-slate-200 dark:hover:bg-slate-700 text-slate-700 dark:text-slate-300 rounded-lg text-xs font-semibold shadow-sm text-center flex items-center justify-center gap-1.5 cursor-pointer"]
							}, [createVNode(unref(Printer), { class: "h-3.5 w-3.5" }), createTextVNode(" Print Struk ")], 10, ["href", "onClick"])) : createCommentVNode("", true), selectedTxn.value ? (openBlock(), createBlock("a", {
								key: 1,
								href: _ctx.route("transactions.kitchen-print", selectedTxn.value.id),
								onClick: withModifiers(($event) => handlePrint(selectedTxn.value.id, "kitchen"), ["prevent"]),
								target: "_blank",
								class: [{ "opacity-50 pointer-events-none": unref(isPrinting) }, "flex-1 py-2 border border-slate-200 dark:border-slate-800 hover:bg-slate-50 dark:hover:bg-slate-900 text-[#8c5a3c] dark:text-[#a17150] rounded-lg text-xs font-semibold shadow-sm text-center flex items-center justify-center gap-1.5 cursor-pointer transition-colors"]
							}, [createVNode(unref(FileText), { class: "h-3.5 w-3.5" }), createTextVNode(" Tiket Dapur ")], 10, ["href", "onClick"])) : createCommentVNode("", true)]), createVNode("div", { class: "flex gap-2" }, [selectedTxn.value?.status === "success" ? (openBlock(), createBlock("button", {
								key: 0,
								onClick: ($event) => openVoidModal(selectedTxn.value),
								class: "flex-1 py-2 bg-rose-600 hover:bg-rose-500 text-white rounded-lg text-xs font-semibold shadow-sm focus:outline-none transition-all flex items-center justify-center gap-1 cursor-pointer"
							}, [createVNode(unref(RefreshCw), { class: "h-3.5 w-3.5 animate-spin-reverse" }), createTextVNode(" Void Order ")], 8, ["onClick"])) : createCommentVNode("", true), createVNode("button", {
								onClick: ($event) => isDetailModalOpen.value = false,
								class: "flex-1 py-2 border border-slate-200 dark:border-slate-800 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-900 rounded-lg text-xs font-semibold transition-all cursor-pointer text-center"
							}, " Close ", 8, ["onClick"])])])
						])])) : createCommentVNode("", true),
						isVoidModalOpen.value ? (openBlock(), createBlock("div", {
							key: 1,
							class: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-950/60 backdrop-blur-sm"
						}, [createVNode("div", { class: "w-full max-w-md bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl p-6 animate-in zoom-in-95 duration-200 space-y-6" }, [
							createVNode("div", { class: "flex items-center gap-3 text-rose-600 dark:text-rose-450" }, [createVNode(unref(AlertTriangle), { class: "h-6 w-6 flex-shrink-0" }), createVNode("h3", { class: "text-lg font-bold" }, "Void Transaction?")]),
							createVNode("p", { class: "text-sm text-slate-500 dark:text-slate-400" }, [
								createTextVNode(" Are you sure you want to void transaction "),
								createVNode("span", { class: "font-bold text-slate-900 dark:text-slate-100" }, "\"" + toDisplayString(txnToVoid.value?.transaction_number) + "\"", 1),
								createTextVNode("? This will cancel the order, mark it as Void, and **instantly restore all deducted stock levels (BOM ingredients / manual retail products)** in the outlet inventory. This action is irreversible. ")
							]),
							createVNode("div", { class: "flex items-center justify-end gap-3" }, [createVNode("button", {
								onClick: ($event) => isVoidModalOpen.value = false,
								class: "px-4 py-2 border border-slate-200 dark:border-slate-800 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-900 rounded-lg text-sm font-semibold transition-all cursor-pointer"
							}, " Cancel ", 8, ["onClick"]), createVNode("button", {
								onClick: submitVoid,
								class: "px-4 py-2 bg-rose-600 hover:bg-rose-500 text-white rounded-lg text-sm font-semibold transition-all cursor-pointer"
							}, " Confirm Void ")])
						])])) : createCommentVNode("", true),
						isDeleteModalOpen.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: "w-full max-w-md bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl p-6 animate-in zoom-in-95 duration-200 space-y-6" }, [
							createVNode("div", { class: "flex items-center gap-3 text-rose-600 dark:text-rose-450" }, [createVNode(unref(AlertTriangle), { class: "h-6 w-6 flex-shrink-0" }), createVNode("h3", { class: "text-lg font-bold" }, "Hapus Transaksi Permanen?")]),
							createVNode("p", { class: "text-sm text-slate-500 dark:text-slate-400 font-sans" }, [
								createTextVNode(" Apakah Anda yakin ingin menghapus transaksi "),
								createVNode("span", { class: "font-bold text-slate-900 dark:text-slate-100" }, "\"" + toDisplayString(txnToDelete.value?.transaction_number) + "\"", 1),
								createTextVNode(" secara permanen dari database? "),
								createVNode("br"),
								createVNode("br"),
								txnToDelete.value?.status !== "cancelled" ? (openBlock(), createBlock("span", {
									key: 0,
									class: "text-rose-500 font-bold block"
								}, " ⚠️ PENTING: Karena status transaksi ini masih aktif (SUKSES), stok bahan baku (BOM) / produk retail yang terpotong akan DIKEMBALIKAN (REVERT) secara otomatis ke dalam inventori! ")) : (openBlock(), createBlock("span", {
									key: 1,
									class: "text-slate-500 block"
								}, " Catatan: Karena transaksi ini sudah di-void (dibatalkan), stok telah dikembalikan sebelumnya dan tidak akan disesuaikan lagi. "))
							]),
							createVNode("div", { class: "flex items-center justify-end gap-3 font-sans" }, [createVNode("button", {
								onClick: ($event) => isDeleteModalOpen.value = false,
								class: "px-4 py-2 border border-slate-200 dark:border-slate-800 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-900 rounded-lg text-sm font-semibold transition-all cursor-pointer"
							}, " Batal ", 8, ["onClick"]), createVNode("button", {
								onClick: submitDelete,
								class: "px-4 py-2 bg-rose-600 hover:bg-rose-500 text-white rounded-lg text-sm font-semibold transition-all cursor-pointer"
							}, " Hapus Transaksi ")])
						])])) : createCommentVNode("", true),
						isPrinterSettingsOpen.value ? (openBlock(), createBlock("div", {
							key: 3,
							class: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-950/65 backdrop-blur-sm animate-in fade-in duration-150"
						}, [createVNode("div", { class: "bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl w-full max-w-md overflow-hidden flex flex-col 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 flex items-center gap-2" }, [createVNode(unref(Settings), { class: "h-4 w-4 text-[#8c5a3c]" }), createVNode("span", null, "Pengaturan Printer POS")]), createVNode("button", {
								onClick: ($event) => isPrinterSettingsOpen.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("div", { class: "p-6 space-y-4 max-h-[70vh] overflow-y-auto font-sans" }, [
								createVNode("div", { class: "space-y-1.5" }, [createVNode("label", { class: "block text-xs font-bold text-slate-650 dark:text-slate-350" }, "Metode Pencetakan"), withDirectives(createVNode("select", {
									"onUpdate:modelValue": ($event) => printSettings.value.method = $event,
									class: "w-full px-3 py-2 text-xs border border-slate-200 dark:border-slate-800 rounded-lg bg-transparent focus:outline-none focus:ring-1 focus:ring-[#8c5a3c] text-slate-850 dark:text-slate-150"
								}, [createVNode("option", { value: "browser" }, "Browser Print (Buka Tab Baru)"), createVNode("option", { value: "qz" }, "QZ Tray (Cetak Otomatis / Silent)")], 8, ["onUpdate:modelValue"]), [[vModelSelect, printSettings.value.method]])]),
								printSettings.value.method === "qz" ? (openBlock(), createBlock("div", {
									key: 0,
									class: "p-3 bg-slate-50 dark:bg-slate-900/30 border border-slate-200 dark:border-slate-800 rounded-xl space-y-3"
								}, [createVNode("div", { class: "flex items-center justify-between" }, [createVNode("span", { class: "text-[10px] font-bold uppercase tracking-wider text-slate-400" }, "Status QZ Tray"), createVNode("span", { class: ["inline-flex px-2 py-0.5 rounded-full text-[9px] font-bold uppercase", qzConnectionStatus.value === "connected" ? "bg-emerald-50 dark:bg-emerald-95/30 text-emerald-700" : "bg-rose-50 dark:bg-rose-95/30 text-rose-700"] }, toDisplayString(qzConnectionStatus.value === "connected" ? "Terhubung" : "Terputus"), 3)]), createVNode("button", {
									type: "button",
									onClick: checkQzConnection,
									disabled: isConnectingQZ.value,
									class: "w-full py-1.5 border border-slate-200 dark:border-slate-800 hover:bg-slate-100 dark:hover:bg-slate-900 text-slate-700 dark:text-slate-300 text-xs font-bold rounded-lg transition-colors cursor-pointer flex items-center justify-center gap-1.5 disabled:opacity-50"
								}, [createVNode(unref(RefreshCw), { class: ["h-3 w-3", { "animate-spin": isConnectingQZ.value }] }, null, 8, ["class"]), createVNode("span", null, "Hubungkan Ulang / Cek Koneksi")], 8, ["disabled"])])) : createCommentVNode("", true),
								printSettings.value.method === "qz" ? (openBlock(), createBlock("div", {
									key: 1,
									class: "space-y-3"
								}, [createVNode("div", { class: "space-y-1.5" }, [createVNode("label", { class: "block text-xs font-bold text-slate-650 dark:text-slate-350" }, "Printer Kasir (Struk)"), availablePrinters.value.length > 0 ? withDirectives((openBlock(), createBlock("select", {
									key: 0,
									"onUpdate:modelValue": ($event) => printSettings.value.posPrinter = $event,
									class: "w-full px-3 py-2 text-xs border border-slate-200 dark:border-slate-800 rounded-lg bg-transparent focus:outline-none focus:ring-1 focus:ring-[#8c5a3c] text-slate-850 dark:text-slate-150"
								}, [createVNode("option", { value: "" }, "-- Pilih Printer Kasir --"), (openBlock(true), createBlock(Fragment, null, renderList(availablePrinters.value, (printer) => {
									return openBlock(), createBlock("option", {
										key: printer,
										value: printer
									}, toDisplayString(printer), 9, ["value"]);
								}), 128))], 8, ["onUpdate:modelValue"])), [[vModelSelect, printSettings.value.posPrinter]]) : withDirectives((openBlock(), createBlock("input", {
									key: 1,
									"onUpdate:modelValue": ($event) => printSettings.value.posPrinter = $event,
									type: "text",
									placeholder: "Masukkan nama printer (e.g. POS-58)",
									class: "w-full px-3 py-2 text-xs border border-slate-200 dark:border-slate-800 rounded-lg bg-transparent focus:outline-none focus:ring-1 focus:ring-[#8c5a3c] text-slate-850 dark:text-slate-150"
								}, null, 8, ["onUpdate:modelValue"])), [[vModelText, printSettings.value.posPrinter]])]), createVNode("div", { class: "space-y-1.5" }, [createVNode("label", { class: "block text-xs font-bold text-slate-650 dark:text-slate-350" }, "Printer Dapur (Tiket)"), availablePrinters.value.length > 0 ? withDirectives((openBlock(), createBlock("select", {
									key: 0,
									"onUpdate:modelValue": ($event) => printSettings.value.kitchenPrinter = $event,
									class: "w-full px-3 py-2 text-xs border border-slate-200 dark:border-slate-800 rounded-lg bg-transparent focus:outline-none focus:ring-1 focus:ring-[#8c5a3c] text-slate-850 dark:text-slate-150"
								}, [createVNode("option", { value: "" }, "-- Pilih Printer Dapur --"), (openBlock(true), createBlock(Fragment, null, renderList(availablePrinters.value, (printer) => {
									return openBlock(), createBlock("option", {
										key: printer,
										value: printer
									}, toDisplayString(printer), 9, ["value"]);
								}), 128))], 8, ["onUpdate:modelValue"])), [[vModelSelect, printSettings.value.kitchenPrinter]]) : withDirectives((openBlock(), createBlock("input", {
									key: 1,
									"onUpdate:modelValue": ($event) => printSettings.value.kitchenPrinter = $event,
									type: "text",
									placeholder: "Masukkan nama printer (e.g. Kitchen-Printer)",
									class: "w-full px-3 py-2 text-xs border border-slate-200 dark:border-slate-800 rounded-lg bg-transparent focus:outline-none focus:ring-1 focus:ring-[#8c5a3c] text-slate-850 dark:text-slate-150"
								}, null, 8, ["onUpdate:modelValue"])), [[vModelText, printSettings.value.kitchenPrinter]])])])) : createCommentVNode("", true)
							]),
							createVNode("div", { class: "px-6 py-4 border-t border-slate-200 dark:border-slate-800 bg-slate-50 dark:bg-slate-900/30 flex items-center justify-end gap-3" }, [createVNode("button", {
								type: "button",
								onClick: ($event) => isPrinterSettingsOpen.value = false,
								class: "px-4 py-2 border border-slate-200 dark:border-slate-800 text-slate-700 dark:text-slate-300 text-xs font-bold rounded-xl hover:bg-slate-50 dark:hover:bg-slate-900 transition-colors cursor-pointer"
							}, " Batal ", 8, ["onClick"]), createVNode("button", {
								type: "button",
								onClick: saveSettings,
								class: "px-4 py-2 bg-[#8c5a3c] hover:bg-[#734a31] text-white text-xs font-bold rounded-xl cursor-pointer"
							}, " Simpan Pengaturan ")])
						])])) : createCommentVNode("", true),
						createVNode(Transition, {
							"enter-active-class": "transition ease-out duration-300",
							"enter-from-class": "opacity-0 scale-95",
							"enter-to-class": "opacity-100 scale-100",
							"leave-active-class": "transition ease-in duration-200",
							"leave-from-class": "opacity-100 scale-100",
							"leave-to-class": "opacity-0 scale-95"
						}, {
							default: withCtx(() => [unref(isPrinting) ? (openBlock(), createBlock("div", {
								key: 0,
								class: "fixed inset-0 z-[200] flex items-center justify-center p-4 bg-slate-950/65 backdrop-blur-md"
							}, [createVNode("div", { class: "bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-2xl shadow-2xl p-6 w-full max-w-sm text-center space-y-4 transform transition-all" }, [createVNode("div", { class: "relative w-16 h-16 mx-auto flex items-center justify-center" }, [
								createVNode("div", { class: "absolute inset-0 rounded-full border-4 border-slate-100 dark:border-slate-900" }),
								createVNode("div", { class: "absolute inset-0 rounded-full border-4 border-t-[#8c5a3c] dark:border-t-[#8c5a3c] animate-spin" }),
								createVNode(unref(Printer), { class: "h-6 w-6 text-[#8c5a3c]" })
							]), createVNode("div", { class: "space-y-1" }, [createVNode("h3", { class: "text-sm font-bold text-slate-900 dark:text-slate-100" }, " Sedang Mencetak Struk "), createVNode("p", { class: "text-xs text-slate-500 dark:text-slate-400 animate-pulse font-medium" }, toDisplayString(unref(printStatus) || "Menghubungkan ke printer..."), 1)])])])) : createCommentVNode("", true)]),
							_: 1
						})
					];
				}),
				_: 1
			}, _parent));
			_push(`<!--]-->`);
		};
	}
});
//#endregion
//#region resources/js/Pages/CafePOS/Transactions/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/Transactions/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 };
