import { Head } from "@inertiajs/vue3";
import { defineComponent, onMounted, unref, useSSRContext } from "vue";
import { ssrInterpolate, ssrRenderComponent, ssrRenderList } from "vue/server-renderer";
import { Printer } from "lucide-vue-next";
//#region resources/js/Pages/CafePOS/Transactions/KitchenPrint.vue?vue&type=script&setup=true&lang.ts
var KitchenPrint_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
	__name: "KitchenPrint",
	__ssrInlineRender: true,
	props: {
		transaction: {},
		appName: {}
	},
	setup(__props) {
		onMounted(() => {
			window.print();
		});
		return (_ctx, _push, _parent, _attrs) => {
			_push(`<!--[-->`);
			_push(ssrRenderComponent(unref(Head), { title: "Cetak Tiket Dapur" }, null, _parent));
			_push(`<div class="min-h-screen bg-slate-100 dark:bg-slate-900 py-8 px-4 flex flex-col items-center"><div class="no-print mb-6 w-full max-w-[80mm] flex items-center justify-between gap-4 bg-white dark:bg-slate-950 p-3.5 border border-slate-200 dark:border-slate-800 rounded-xl shadow-sm"><span class="text-xs font-bold text-slate-500">Tiket Dapur</span><button class="flex items-center justify-center gap-1.5 px-3 py-1.5 bg-[#8c5a3c] hover:bg-[#734a31] text-white text-xs font-bold rounded-lg cursor-pointer">`);
			_push(ssrRenderComponent(unref(Printer), { class: "h-3.5 w-3.5" }, null, _parent));
			_push(` Cetak Ulang </button></div><div class="print-container bg-white text-black p-4 w-[80mm] border border-slate-250 shadow-md font-mono text-xs leading-tight"><div class="text-center space-y-1.5 pb-3 border-b border-dashed border-black"><h1 class="text-sm font-black uppercase tracking-wider">TIKET DAPUR</h1><div class="text-[10px]"> Outlet: <span class="font-bold">${ssrInterpolate(__props.transaction.outlet?.name)}</span></div><div class="text-[9px] text-slate-600">${ssrInterpolate(__props.transaction.created_at)}</div></div><div class="py-3 border-b border-dashed border-black space-y-1"><div class="flex justify-between"><span>Tipe Order:</span><span class="font-black uppercase">${ssrInterpolate(__props.transaction.order_type === "dine_in" ? "DINE IN" : __props.transaction.order_type === "delivery" ? "DELIVERY" : "TAKE AWAY")}</span></div>`);
			if (__props.transaction.order_type === "dine_in") _push(`<div class="flex justify-between"><span>Meja:</span><span class="text-sm font-black">${ssrInterpolate(__props.transaction.table?.number)}</span></div>`);
			else _push(`<!---->`);
			_push(`<div class="flex justify-between"><span>No. Antrean:</span><span class="text-sm font-black text-rose-700">${ssrInterpolate(__props.transaction.queue_number || "-")}</span></div><div class="text-[8px] text-slate-500 pt-1 truncate"> ID: ${ssrInterpolate(__props.transaction.transaction_number)}</div></div><div class="py-3 space-y-3"><!--[-->`);
			ssrRenderList(__props.transaction.items, (item) => {
				_push(`<div class="space-y-1.5"><div class="flex items-start justify-between gap-2"><div class="flex-1"><span class="font-black text-sm">${ssrInterpolate(item.product?.name)}</span>`);
				if (item.variant) _push(`<span class="block text-[10px] font-bold uppercase text-slate-700 mt-0.5"> [${ssrInterpolate(item.variant)}] </span>`);
				else _push(`<!---->`);
				_push(`</div><span class="text-base font-black px-1.5 border border-black rounded"> x${ssrInterpolate(item.qty)}</span></div>`);
				if (item.modifiers.length > 0) {
					_push(`<div class="pl-3.5 space-y-0.5 border-l border-slate-300"><!--[-->`);
					ssrRenderList(item.modifiers, (m) => {
						_push(`<div class="text-[10px] font-bold text-slate-700 flex items-center gap-1"><span>-</span><span>${ssrInterpolate(m.name)}</span></div>`);
					});
					_push(`<!--]--></div>`);
				} else _push(`<!---->`);
				_push(`</div>`);
			});
			_push(`<!--]--></div><div class="pt-3 border-t border-dashed border-black text-center text-[10px]"><p class="font-black">*** CAFE POS KITCHEN TICKET ***</p></div></div></div><!--]-->`);
		};
	}
});
//#endregion
//#region resources/js/Pages/CafePOS/Transactions/KitchenPrint.vue
var _sfc_setup = KitchenPrint_vue_vue_type_script_setup_true_lang_default.setup;
KitchenPrint_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/KitchenPrint.vue");
	return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
var KitchenPrint_default = KitchenPrint_vue_vue_type_script_setup_true_lang_default;
//#endregion
export { KitchenPrint_default as default };
