import { t as _sfc_main$1 } from "./SecondaryButton-ub85RH3e.js";
import { G as $can, M as _sfc_main$2, N as KeyBoard_default, P as vKeyboard, V as searchItems, _ as _sfc_main$3, ft as _sfc_main$5, gt as _sfc_main$8, j as _sfc_main$10, mt as _sfc_main$9, nt as calculate_item, pt as _sfc_main$4, vt as _sfc_main$7, x as _sfc_main$6 } from "../ssr.js";
import _sfc_main$11 from "./ChangeTable-DWa1yA82.js";
import _sfc_main$12 from "./VerifyPinCode-ClGTVT8P.js";
import { t as PosHelper } from "./PosHelper-DzTlIAyQ.js";
import { router } from "@inertiajs/vue3";
import { Fragment, createBlock, createCommentVNode, createTextVNode, createVNode, mergeProps, openBlock, ref, renderList, resolveComponent, toDisplayString, unref, useSSRContext, withCtx, withModifiers } from "vue";
import { ssrGetDirectiveProps, ssrGetDynamicModelProps, ssrIncludeBooleanAttr, ssrInterpolate, ssrRenderAttr, ssrRenderAttrs, ssrRenderClass, ssrRenderComponent, ssrRenderList, ssrRenderStyle } from "vue/server-renderer";
//#region resources/js/Pages/Sma/Pos/Modern.vue
var _sfc_main = {
	__name: "Modern",
	__ssrInlineRender: true,
	props: [
		"taxes",
		"categories",
		"countries",
		"custom_fields",
		"customer_fields",
		"payment_fields",
		"customer",
		"sale",
		"order",
		"products",
		"halls"
	],
	setup(__props) {
		const { grid, cId, search, receipt, loading, customer, finalize, itemsHeight, showOrder, orderItems, printBill, printOrder, showOrders, showQrOrders, qrOrdersCount, loadingPage, orderActions, orderDetails, orderSummary, showReceipt, delete_order, giftCardModal, orderCustomer, showCustomer, menusContainer, open_register, orderContainer, view_register, order_discount, showMobileMenu, addCustomerModal, mobileMenuContainer, form, currentItem, variantModal, SelectVariant, openItemModal, selectItem, selectedItem, saveForm, removeItem, openOrder, holdOrder, saveOrder, showPaymentModal, loadOrder, showOrderDiscount, applyOrderDiscount, updatedOrderItem, showOrderDetails, addItem, addProduct, quantityChanged, deleteOrder, loadQrOrder, getProducts, showCustomerDetails, addCustomer, handleSubmit, CustomerForm, ViewCustomer, FormItem, OpenOrder, PrintBill, PrintOrder, ShowOrders, ShowQrOrders, AddGiftCard, FormActions, FinalizeSale, OpenRegister, OrderSummary, PrintReceipt, OrderDiscount, UpdateFormItem, RegisterDetails, playSuccessSound, sendToPPS } = PosHelper(__props);
		const currentCategory = ref(null);
		const show_categories_modal = ref(false);
		const scannerOpen = ref(false);
		const changeTableModal = ref(false);
		async function handleBarcodeScan(code) {
			scannerOpen.value = false;
			const results = await searchItems(code, "sale", true);
			if (results && results.length) await addItem(results[0]);
		}
		function handleTableChange(data) {
			form.hall_id = data.hall_id;
			form.table_id = data.table_id;
			saveForm();
			saveOrder();
			router.reload({ only: ["halls"] });
			changeTableModal.value = false;
		}
		return (_ctx, _push, _parent, _attrs) => {
			const _component_Head = resolveComponent("Head");
			const _component_Icon = resolveComponent("Icon");
			const _component_Link = resolveComponent("Link");
			let _temp0;
			_push(`<!--[-->`);
			_push(ssrRenderComponent(_component_Head, { title: "POS" }, null, _parent));
			_push(`<div>`);
			if (unref(showOrder)) _push(`<div class="fixed inset-0 z-1 bg-gray-500/70 backdrop-blur-xs lg:hidden dark:bg-gray-800/70"></div>`);
			else _push(`<!---->`);
			_push(`<aside class="${ssrRenderClass([[unref(showOrder) ? "z-10" : "hidden lg:block", _ctx.$page.props.settings.show_order_by_default == 1 ? "w-full sm:w-96" : "w-96"], "fixed inset-y-0 end-0 overflow-y-auto border-s border-transparent bg-gray-100 lg:shadow-2xl xl:shadow-lg dark:border-gray-800 dark:bg-gray-800 print:block print:w-full print:border-0"])}"><div id="order-container" class="flex max-h-full min-h-full w-full flex-col"><div id="order-details" class="flex items-start justify-between px-4 pt-4"><div class="grow leading-6 font-semibold text-gray-900 dark:text-gray-100">`);
			if (_ctx.$page.props.settings?.restaurant == 1 && unref(form).table_id) {
				_push(`<div class="flex items-center gap-1"><button type="button" class="group -mx-2 -my-1 flex items-center rounded-md bg-gray-100 px-2 py-1 text-sm transition-all hover:bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-900">${ssrInterpolate(__props.halls.find((h) => h.id == unref(form).hall_id)?.tables?.find((t) => t.id == unref(form).table_id)?.name + " (" + __props.halls.find((h) => h.id == unref(form).hall_id)?.name + ")" || "")} `);
				_push(ssrRenderComponent(_component_Icon, {
					name: "edit",
					class: "invisible size-4! transition-all group-hover:visible group-hover:ms-2"
				}, null, _parent));
				_push(`</button></div>`);
			} else if (_ctx.$page.props.settings?.restaurant == 1 && unref(form).reference_number) _push(`<div class="flex items-center gap-1">${ssrInterpolate(_ctx.$t("Reference"))}: ${ssrInterpolate(unref(form).reference_number || "")}</div>`);
			else {
				_push(`<div class="flex items-center gap-1">${ssrInterpolate(_ctx.$t("Order Details"))} `);
				if (unref(form).reference && unref(form).reference != "f") _push(`<div class="text-xs">(${ssrInterpolate(unref(form).reference)})</div>`);
				else _push(`<!---->`);
				_push(`</div>`);
			}
			_push(`</div><div class="flex items-stretch gap-2 text-end"><div class="text-right"><div class="text-xs">${ssrInterpolate(_ctx.$t("Order Number"))}</div><div class="text-xs font-bold">#${ssrInterpolate(unref(form).number)}</div></div>`);
			if (unref(showOrder)) _push(`<button type="button" class="-me-2 block rounded-md p-1 hover:bg-gray-200 lg:hidden dark:hover:bg-gray-950"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="h-5 w-5"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"></path></svg></button>`);
			else _push(`<!---->`);
			_push(`</div></div><div id="order-customer" class="px-4 pt-2 pb-6"><div class="relative mt-px grid grid-cols-1 items-center">`);
			_push(ssrRenderComponent(unref(_sfc_main$2), {
				keyboard: "",
				json: true,
				valueKey: "id",
				hideIcon: true,
				id: "customer_id",
				labelKey: "company",
				searchable: true,
				onChange: (e) => {
					unref(form).customer = e;
					unref(saveForm)();
				},
				modelValue: unref(form).customer_id,
				"onUpdate:modelValue": ($event) => unref(form).customer_id = $event,
				selected: unref(form).customer_id,
				suggestions: _ctx.route("search.customers"),
				inputClass: "focus rounded-full shadow-xl border-0 print:shadow-none print:border-b print:px-0 print:rounded-none"
			}, null, _parent));
			_push(`<div class="absolute inset-y-0 end-2 flex items-stretch gap-1 print:hidden"><button type="button" class="inline-flex items-center rounded-xs px-1 text-gray-400 focus:ring-inset"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="h-6 w-6"><path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"></path></svg></button><button type="button" class="inline-flex items-center rounded-xs px-1 text-gray-400 focus:ring-inset"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="h-6 w-6"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"></path></svg></button></div></div>`);
			if (_ctx.$page.props.errors?.customer_id) _push(`<div class="text-sm text-red-500">${ssrInterpolate(_ctx.$page.props.errors.customer_id)}</div>`);
			else _push(`<!---->`);
			if (_ctx.$page.props.settings.show_order_by_default == 1) {
				_push(`<div class="mt-4 lg:hidden"><div class="relative w-full"><input${ssrRenderAttrs((_temp0 = mergeProps({
					type: "text",
					value: unref(search),
					id: "product-search-order",
					placeholder: _ctx.$t("Type to search products"),
					class: "focus block w-full rounded-full border-gray-300 bg-white px-4 py-2 text-base shadow-xl placeholder:text-gray-400 sm:text-sm/6 dark:border-gray-700 dark:bg-gray-800"
				}, ssrGetDirectiveProps(_ctx, unref(vKeyboard))), mergeProps(_temp0, ssrGetDynamicModelProps(_temp0, unref(search)))))}>`);
				if (unref(showOrder) && unref(search) && _ctx.result && _ctx.result.length) {
					_push(`<div class="absolute start-0 end-0 top-full z-20 mt-2 rounded-md bg-white py-2 ring-1 ring-gray-200 dark:bg-gray-700 dark:ring-gray-700"><!--[-->`);
					ssrRenderList(_ctx.result, (p) => {
						_push(`<button type="button" class="w-full px-4 py-1 text-start hover:bg-gray-100 dark:hover:bg-gray-900">${ssrInterpolate(p.name)}</button>`);
					});
					_push(`<!--]--></div>`);
				} else _push(`<!---->`);
				_push(`</div></div>`);
			} else _push(`<!---->`);
			_push(`</div><div id="order-items" class="flex min-h-[150px] w-full flex-col overflow-auto px-4 pb-4 print:h-full! print:min-h-0 print:overflow-visible" style="${ssrRenderStyle({ height: unref(itemsHeight) + "px" })}">`);
			if (_ctx.$page.props.opened_register) {
				_push(`<ul role="list" class=""><!--[-->`);
				ssrRenderList(unref(form).items, (item) => {
					_push(ssrRenderComponent(unref(FormItem), {
						item,
						onEdit: unref(selectItem),
						onRemove: unref(removeItem),
						onUpdate: unref(quantityChanged)
					}, null, _parent));
				});
				_push(`<!--]--></ul>`);
			} else _push(`<!---->`);
			_push(`</div><div id="order-summary" class="bg-white p-4 dark:bg-gray-950">`);
			_push(ssrRenderComponent(unref(OrderSummary), {
				form: unref(form),
				onDiscount: unref(showOrderDiscount)
			}, null, _parent));
			_push(`</div><div id="order-actions" class="flex items-center gap-2 bg-white px-4 pb-4 dark:bg-gray-950 print:hidden">`);
			_push(ssrRenderComponent(unref(FormActions), {
				onHold: unref(holdOrder),
				loading: unref(loadingPage),
				onPayment: unref(showPaymentModal),
				onPrintBill: ($event) => printBill.value = true,
				onPrintOrder: ($event) => printOrder.value = true,
				onDeleteOrder: ($event) => delete_order.value = unref(form).number
			}, null, _parent));
			_push(`</div></div></aside>`);
			if (unref(showMobileMenu)) _push(`<div class="fixed inset-0 z-10 bg-gray-500/70 backdrop-blur-xs lg:hidden dark:bg-gray-800/70"></div>`);
			else _push(`<!---->`);
			_push(`<div class="${ssrRenderClass([unref(showMobileMenu) ? "fixed start-0 z-10 flex h-screen items-stretch justify-stretch overflow-auto lg:static lg:hidden lg:overflow-hidden" : "hidden overflow-hidden", "block max-h-full min-h-full w-56 shrink-0 border-s border-gray-200 bg-white shadow-lg lg:hidden dark:border-gray-700 dark:bg-gray-950 print:hidden"])}"><div class="flex w-full items-stretch justify-stretch p-4"><div class="flex flex-1 flex-col" aria-label="Sidebar"><ul role="list" class="-mx-2 space-y-1"><li><button type="button" class="group flex w-full gap-x-3 rounded-md p-2 ps-3 text-sm leading-6 font-semibold hover:bg-gray-50 dark:hover:bg-gray-950">${ssrInterpolate(_ctx.$t("View Open Orders"))}</button></li>`);
			if (_ctx.$page.props.settings?.restaurant == 1) {
				_push(`<li><button type="button" class="group flex w-full items-center gap-x-3 rounded-md p-2 ps-3 text-sm leading-6 font-semibold hover:bg-gray-50 dark:hover:bg-gray-950">${ssrInterpolate(_ctx.$t("QR Code Orders"))} `);
				if (unref(qrOrdersCount) > 0) _push(`<span class="ml-auto flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs font-bold text-white">${ssrInterpolate(unref(qrOrdersCount))}</span>`);
				else _push(`<!---->`);
				_push(`</button></li>`);
			} else _push(`<!---->`);
			_push(`<li><button type="button" class="group flex w-full gap-x-3 rounded-md p-2 ps-3 text-sm leading-6 font-semibold hover:bg-gray-50 dark:hover:bg-gray-950">${ssrInterpolate(_ctx.$t("View Register Details"))}</button></li></ul><ul role="list" class="-mx-2 mt-auto space-y-1"><li><a${ssrRenderAttr("href", _ctx.route("dashboard"))} class="group flex gap-x-3 rounded-md p-2 ps-3 text-sm leading-6 font-semibold hover:bg-gray-50 dark:hover:bg-gray-950">${ssrInterpolate(_ctx.$t("Dashboard"))}</a></li><li><a${ssrRenderAttr("href", _ctx.route("settings.pos"))} class="group flex gap-x-3 rounded-md p-2 ps-3 text-sm leading-6 font-semibold hover:bg-gray-50 dark:hover:bg-gray-950">${ssrInterpolate(_ctx.$t("POS Settings"))}</a></li><li><a${ssrRenderAttr("href", _ctx.route("orders.index"))} class="group flex gap-x-3 rounded-md p-2 ps-3 text-sm leading-6 font-semibold hover:bg-gray-50 dark:hover:bg-gray-950">${ssrInterpolate(_ctx.$t("POS Orders"))}</a></li><li><a${ssrRenderAttr("href", _ctx.route("sales.index"))} class="group flex gap-x-3 rounded-md p-2 ps-3 text-sm leading-6 font-semibold hover:bg-gray-50 dark:hover:bg-gray-950">${ssrInterpolate(_ctx.$t("List {x}", { x: _ctx.$t("Sales") }))}</a></li><li><a target="_blank"${ssrRenderAttr("href", _ctx.route("customer.view"))} class="group flex gap-x-3 rounded-md p-2 ps-3 text-sm leading-6 font-semibold hover:bg-gray-50 dark:hover:bg-gray-950">${ssrInterpolate(_ctx.$t("Customer View"))}</a></li></ul></div></div></div><main class="min-h-screen bg-gray-50 dark:bg-gray-950 print:hidden"><div class="lg:pe-96"><div class="px-4 pt-4 pb-10 sm:px-6 lg:px-8 lg:py-6"><div class="mb-6 flex items-center justify-between"><div class="flex items-center gap-2">`);
			_push(ssrRenderComponent(_component_Link, {
				href: _ctx.route("dashboard"),
				class: "relative inline-flex items-center justify-center rounded-lg p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:ring-2 focus:ring-primary-500 focus:outline-hidden focus:ring-inset dark:hover:bg-gray-800 dark:hover:text-gray-200"
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) _push(ssrRenderComponent(_component_Icon, {
						name: "home-o",
						class: "size-6"
					}, null, _parent, _scopeId));
					else return [createVNode(_component_Icon, {
						name: "home-o",
						class: "size-6"
					})];
				}),
				_: 1
			}, _parent));
			_push(`<h4 class="hidden font-bold md:block">${ssrInterpolate(_ctx.$t("Categories"))}</h4></div><div class="flex items-center gap-2"><div class="relative hidden w-full max-w-56 sm:block">`);
			_push(ssrRenderComponent(unref(_sfc_main$3), {
				rounded: "",
				model: "sale",
				type: "pos",
				onAddItem: unref(addItem)
			}, null, _parent));
			_push(`</div><button type="button"${ssrRenderAttr("title", _ctx.$t("Scan Barcode"))} class="relative hidden items-center justify-center rounded-lg p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:ring-2 focus:ring-primary-500 focus:outline-hidden focus:ring-inset sm:inline-flex dark:hover:bg-gray-800 dark:hover:text-gray-200"><svg xmlns="http://www.w3.org/2000/svg" class="size-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M3 9V6a1 1 0 011-1h3M3 15v3a1 1 0 001 1h3m11-4v3a1 1 0 01-1 1h-3m4-11h-3a1 1 0 00-1 1v3M7 7h2v2H7zm0 4h2v2H7zm4-4h2v2h-2zm0 4h2v2h-2zm4-4h2v2h-2zm0 4h2v2h-2z"></path></svg></button><div class="flex items-center lg:hidden lg:gap-2 xl:gap-4"><button type="button" class="relative inline-flex items-center justify-center rounded-md p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:ring-2 focus:ring-primary-500 focus:outline-hidden focus:ring-inset dark:hover:bg-gray-800 dark:hover:text-gray-200"><span class="absolute -inset-0.5"></span><span class="sr-only">${ssrInterpolate(_ctx.$t("Open menu"))}</span><svg class="block h-6 w-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"></path></svg><svg class="hidden h-6 w-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path></svg></button><button type="button" class="relative inline-flex items-center justify-center rounded-md p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:ring-2 focus:ring-primary-500 focus:outline-hidden focus:ring-inset dark:hover:bg-gray-800 dark:hover:text-gray-200"><span class="absolute -inset-0.5"></span><span class="sr-only">${ssrInterpolate(_ctx.$t("View {x}", { x: _ctx.$t("Order") }))}</span>`);
			_push(ssrRenderComponent(_component_Icon, {
				name: "cart-o",
				class: "size-6"
			}, null, _parent));
			_push(`</button></div><div class="relative z-1 flex lg:items-center lg:justify-end lg:gap-2 xl:gap-4"><button type="button" class="relative inline-flex items-center justify-center rounded-lg p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:ring-2 focus:ring-primary-500 focus:outline-hidden focus:ring-inset dark:hover:bg-gray-800 dark:hover:text-gray-200">`);
			_push(ssrRenderComponent(_component_Icon, {
				name: "gift-o",
				class: "size-6"
			}, null, _parent));
			_push(`</button><a target="_blank"${ssrRenderAttr("href", _ctx.route("customer.view"))} class="relative hidden items-center justify-center rounded-lg p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:ring-2 focus:ring-primary-500 focus:outline-hidden focus:ring-inset lg:inline-flex dark:hover:bg-gray-800 dark:hover:text-gray-200"><span class="absolute -inset-1.5"></span><span class="sr-only">${ssrInterpolate(_ctx.$t("Customer View"))}</span>`);
			_push(ssrRenderComponent(_component_Icon, {
				name: "tablet-o",
				class: "size-6"
			}, null, _parent));
			_push(`</a>`);
			if (unref($can)("read-sales")) _push(ssrRenderComponent(_component_Link, {
				href: _ctx.route("sales.index"),
				class: "relative hidden items-center justify-center rounded-lg p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:ring-2 focus:ring-primary-500 focus:outline-hidden focus:ring-inset xl:inline-flex dark:hover:bg-gray-800 dark:hover:text-gray-200"
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) {
						_push(`<span class="absolute -inset-1.5"${_scopeId}></span><span class="sr-only"${_scopeId}>${ssrInterpolate(_ctx.$t("View Sales"))}</span>`);
						_push(ssrRenderComponent(_component_Icon, {
							name: "bag-o",
							class: "size-6"
						}, null, _parent, _scopeId));
					} else return [
						createVNode("span", { class: "absolute -inset-1.5" }),
						createVNode("span", { class: "sr-only" }, toDisplayString(_ctx.$t("View Sales")), 1),
						createVNode(_component_Icon, {
							name: "bag-o",
							class: "size-6"
						})
					];
				}),
				_: 1
			}, _parent));
			else _push(`<!---->`);
			_push(`<button type="button" class="relative inline-flex items-center justify-center rounded-lg p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:ring-2 focus:ring-primary-500 focus:outline-hidden focus:ring-inset dark:hover:bg-gray-800 dark:hover:text-gray-200"><span class="absolute -inset-1.5"></span><span class="sr-only">${ssrInterpolate(_ctx.$t("Cash Register"))}</span>`);
			_push(ssrRenderComponent(_component_Icon, {
				name: "register-o",
				class: "mt-1 size-6"
			}, null, _parent));
			_push(`</button><button type="button" class="relative inline-flex items-center justify-center rounded-lg p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:ring-2 focus:ring-primary-500 focus:outline-hidden focus:ring-inset dark:hover:bg-gray-800 dark:hover:text-gray-200"><span class="absolute -inset-1.5"></span><span class="sr-only">${ssrInterpolate(_ctx.$t("List Open Orders"))}</span>`);
			_push(ssrRenderComponent(_component_Icon, {
				name: "squares-o",
				class: "size-6"
			}, null, _parent));
			_push(`</button>`);
			if (_ctx.$page.props.settings?.restaurant == 1) {
				_push(`<button type="button" class="relative inline-flex items-center justify-center rounded-lg p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:ring-2 focus:ring-primary-500 focus:outline-hidden focus:ring-inset dark:hover:bg-gray-800 dark:hover:text-gray-200"><span class="absolute -inset-1.5"></span><span class="sr-only">${ssrInterpolate(_ctx.$t("QR Code Orders"))}</span><svg class="size-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12 4v1m6 11h2m-6 0h-2v4m0-11v3m0 0h.01M12 12h4.01M16 20h4M4 12h4m12 0h.01M5 8h2a1 1 0 001-1V5a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1zm12 0h2a1 1 0 001-1V5a1 1 0 00-1-1h-2a1 1 0 00-1 1v2a1 1 0 001 1zM5 20h2a1 1 0 001-1v-2a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1z"></path></svg>`);
				if (unref(qrOrdersCount) > 0) _push(`<span class="absolute -end-0.5 -top-0.5 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs font-bold text-white">${ssrInterpolate(unref(qrOrdersCount))}</span>`);
				else _push(`<!---->`);
				_push(`</button>`);
			} else _push(`<!---->`);
			if (unref($can)("settings")) _push(ssrRenderComponent(_component_Link, {
				href: _ctx.route("settings.pos"),
				class: "relative inline-flex items-center justify-center rounded-lg p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:ring-2 focus:ring-primary-500 focus:outline-hidden focus:ring-inset dark:hover:bg-gray-800 dark:hover:text-gray-200"
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) {
						_push(`<span class="absolute -inset-1.5"${_scopeId}></span><span class="sr-only"${_scopeId}>${ssrInterpolate(_ctx.$t("POS Settings"))}</span>`);
						_push(ssrRenderComponent(_component_Icon, {
							name: "cog-o",
							class: "size-6"
						}, null, _parent, _scopeId));
					} else return [
						createVNode("span", { class: "absolute -inset-1.5" }),
						createVNode("span", { class: "sr-only" }, toDisplayString(_ctx.$t("POS Settings")), 1),
						createVNode(_component_Icon, {
							name: "cog-o",
							class: "size-6"
						})
					];
				}),
				_: 1
			}, _parent));
			else _push(`<!---->`);
			_push(ssrRenderComponent(unref(_sfc_main$4), {
				align: "right",
				width: "48"
			}, {
				trigger: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) {
						_push(`<button class="flex h-10 w-10 items-center rounded-full p-1 transition duration-150 ease-in-out"${_scopeId}>`);
						if (_ctx.$page.props.jetstream.managesProfilePhotos) _push(`<img${ssrRenderAttr("alt", _ctx.$page.props.auth.user.name)}${ssrRenderAttr("src", _ctx.$page.props.auth.user.profile_photo_url)} class="h-8 w-8 rounded-full object-cover xl:me-2"${_scopeId}>`);
						else _push(`<!---->`);
						_push(`<span class="sr-only"${_scopeId}>${ssrInterpolate(_ctx.$page.props.auth.user.name)}</span></button>`);
					} else return [createVNode("button", { class: "flex h-10 w-10 items-center rounded-full p-1 transition duration-150 ease-in-out" }, [_ctx.$page.props.jetstream.managesProfilePhotos ? (openBlock(), createBlock("img", {
						key: 0,
						alt: _ctx.$page.props.auth.user.name,
						src: _ctx.$page.props.auth.user.profile_photo_url,
						class: "h-8 w-8 rounded-full object-cover xl:me-2"
					}, null, 8, ["alt", "src"])) : createCommentVNode("", true), createVNode("span", { class: "sr-only" }, toDisplayString(_ctx.$page.props.auth.user.name), 1)])];
				}),
				content: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) {
						_push(`<div class="text-left"${_scopeId}><div class="block px-4 py-2 text-xs text-gray-400"${_scopeId}>${ssrInterpolate(_ctx.$t("Manage Account"))}</div>`);
						_push(ssrRenderComponent(unref(_sfc_main$5), { href: _ctx.route("profile.show") }, {
							default: withCtx((_, _push, _parent, _scopeId) => {
								if (_push) _push(`${ssrInterpolate(_ctx.$t("Profile"))}`);
								else return [createTextVNode(toDisplayString(_ctx.$t("Profile")), 1)];
							}),
							_: 1
						}, _parent, _scopeId));
						if (_ctx.$page.props.jetstream.hasApiFeatures) _push(ssrRenderComponent(unref(_sfc_main$5), { href: _ctx.route("api-tokens.index") }, {
							default: withCtx((_, _push, _parent, _scopeId) => {
								if (_push) _push(`${ssrInterpolate(_ctx.$t("API Tokens"))}`);
								else return [createTextVNode(toDisplayString(_ctx.$t("API Tokens")), 1)];
							}),
							_: 1
						}, _parent, _scopeId));
						else _push(`<!---->`);
						_push(`<div class="border-t border-gray-100 dark:border-gray-700"${_scopeId}></div><form${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$5), { as: "button" }, {
							default: withCtx((_, _push, _parent, _scopeId) => {
								if (_push) _push(`${ssrInterpolate(_ctx.$t("Log Out"))}`);
								else return [createTextVNode(toDisplayString(_ctx.$t("Log Out")), 1)];
							}),
							_: 1
						}, _parent, _scopeId));
						_push(`</form></div>`);
					} else return [createVNode("div", { class: "text-left" }, [
						createVNode("div", { class: "block px-4 py-2 text-xs text-gray-400" }, toDisplayString(_ctx.$t("Manage Account")), 1),
						createVNode(unref(_sfc_main$5), { href: _ctx.route("profile.show") }, {
							default: withCtx(() => [createTextVNode(toDisplayString(_ctx.$t("Profile")), 1)]),
							_: 1
						}, 8, ["href"]),
						_ctx.$page.props.jetstream.hasApiFeatures ? (openBlock(), createBlock(unref(_sfc_main$5), {
							key: 0,
							href: _ctx.route("api-tokens.index")
						}, {
							default: withCtx(() => [createTextVNode(toDisplayString(_ctx.$t("API Tokens")), 1)]),
							_: 1
						}, 8, ["href"])) : createCommentVNode("", true),
						createVNode("div", { class: "border-t border-gray-100 dark:border-gray-700" }),
						createVNode("form", { onSubmit: withModifiers(_ctx.logout, ["prevent"]) }, [createVNode(unref(_sfc_main$5), { as: "button" }, {
							default: withCtx(() => [createTextVNode(toDisplayString(_ctx.$t("Log Out")), 1)]),
							_: 1
						})], 40, ["onSubmit"])
					])];
				}),
				_: 1
			}, _parent));
			_push(`</div></div></div><div class="-mx-4 sm:-mx-6 lg:-mx-8"><div class="min-w-full overflow-x-auto px-4 sm:px-6 lg:px-8"><div class="inline-flex gap-4 pb-8"><!--[-->`);
			ssrRenderList(__props.categories, (c) => {
				_push(`<!--[-->`);
				if (c.children && c.children.length) {
					_push(`<button type="button" class="${ssrRenderClass([c.id == unref(cId) || c.children.find((sc) => sc.id == unref(cId)) ? "font-bold" : "", "relative flex w-24 flex-col items-center justify-center gap-2 rounded-2xl bg-white p-4 text-sm shadow-lg hover:shadow-xl focus:ring-0 focus:outline-hidden dark:bg-gray-800 dark:hover:bg-gray-700"])}">`);
					if (c.photo) _push(`<img${ssrRenderAttr("src", c.photo)} alt="" class="h-8 w-8 rounded">`);
					else _push(`<!---->`);
					_push(`<div class="line-clamp-3">${ssrInterpolate(c.name)}</div><span class="absolute end-0 top-0 flex size-6 items-center justify-center overflow-hidden rounded-full bg-gray-200 text-xs group-hover:end-2 dark:bg-gray-700">${ssrInterpolate(c.products_count > 99 ? "99+" : c.products_count)}</span></button>`);
				} else {
					_push(`<button type="button" class="${ssrRenderClass([c.id == unref(cId) ? "font-bold" : "", "relative flex w-24 flex-col items-center justify-center gap-2 rounded-2xl bg-white p-4 text-sm shadow-lg hover:shadow-xl focus:ring-0 focus:outline-hidden dark:bg-gray-800 dark:hover:bg-gray-700"])}">`);
					if (c.photo) _push(`<img${ssrRenderAttr("src", c.photo)} alt="" class="h-8 w-8 rounded">`);
					else _push(`<!---->`);
					_push(`<div class="line-clamp-3">${ssrInterpolate(c.name)}</div><span class="absolute end-0 top-0 flex size-6 items-center justify-center overflow-hidden rounded-full bg-gray-200 text-xs group-hover:end-2 dark:bg-gray-700">${ssrInterpolate(c.products_count > 99 ? "99+" : c.products_count)}</span></button>`);
				}
				_push(`<!--]-->`);
			});
			_push(`<!--]--></div></div></div><div class="z-0"><div class="mt-4 flex items-center justify-between gap-4"><h4 class="font-bold">${ssrInterpolate(_ctx.$t("Products"))}</h4><div class="flex items-center gap-2"><div class="relative z-10 block max-w-56 sm:hidden">`);
			_push(ssrRenderComponent(unref(_sfc_main$3), {
				rounded: "",
				model: "sale",
				type: "pos",
				id: "product-search-order",
				onAddItem: unref(addItem)
			}, null, _parent));
			_push(`</div><button type="button"${ssrRenderAttr("title", _ctx.$t("Scan Barcode"))} class="relative block inline-flex items-center justify-center rounded-lg p-2 text-gray-400 hover:bg-gray-100 hover:text-gray-500 focus:ring-2 focus:ring-primary-500 focus:outline-hidden focus:ring-inset sm:hidden dark:hover:bg-gray-800 dark:hover:text-gray-200"><svg xmlns="http://www.w3.org/2000/svg" class="size-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M3 9V6a1 1 0 011-1h3M3 15v3a1 1 0 001 1h3m11-4v3a1 1 0 01-1 1h-3m4-11h-3a1 1 0 00-1 1v3M7 7h2v2H7zm0 4h2v2H7zm4-4h2v2h-2zm0 4h2v2h-2zm4-4h2v2h-2zm0 4h2v2h-2z"></path></svg></button></div></div>`);
			if (unref(loading)) _push(ssrRenderComponent(unref(_sfc_main$6), null, null, _parent));
			else _push(`<!---->`);
			if (unref(grid) && unref(grid).length) {
				_push(`<div class="mt-8 flex flex-wrap items-start justify-start gap-x-4 gap-y-8"><!--[-->`);
				ssrRenderList(unref(grid), (p) => {
					_push(`<button type="button"${ssrIncludeBooleanAttr(_ctx.$page.props.settings.overselling != 1 && p.store_stock?.balance <= 0) ? " disabled" : ""} class="group relative z-0 mt-12 flex h-[100px] w-[100px] flex-col justify-end hover:drop-shadow-xl disabled:pointer-events-none disabled:opacity-50 sm:w-[150px]"><div class="absolute start-1/2 top-0 h-16 w-16 -translate-y-1/2 overflow-hidden rounded-full bg-white p-0 shadow-md sm:h-24 sm:w-24 ltr:ltr:-translate-x-1/2 rtl:translate-x-1/2 dark:bg-gray-800 dark:group-hover:bg-gray-700">`);
					if (p.photo) _push(`<img${ssrRenderAttr("src", p.photo)} alt="" class="h-full w-full rounded-full object-contain object-center">`);
					else _push(`<!---->`);
					_push(`</div><div class="min-h-24 overflow-hidden rounded-2xl bg-white shadow-xl dark:bg-gray-800 dark:group-hover:bg-gray-700"><div class="mt-10 flex min-h-10 items-center justify-center px-1 text-sm leading-tight sm:mt-12">${ssrInterpolate(p.name)}</div></div><div class="absolute start-1/2 -top-15 flex h-6 min-w-7 items-center justify-center rounded-full bg-white px-1 text-xs font-bold shadow ltr:-translate-x-1/2 rtl:translate-x-1/2 dark:bg-gray-800">${ssrInterpolate(_ctx.$decimal_qty(p.store_stock?.balance || 0))}</div></button>`);
				});
				_push(`<!--]--></div>`);
			} else _push(`<div class="text-mute flex h-full w-full items-center justify-center">${ssrInterpolate(_ctx.$t("There is no product to display"))}</div>`);
			_push(`</div></div></div></main></div><div>`);
			if (unref(variantModal)) _push(ssrRenderComponent(unref(SelectVariant), {
				item: unref(currentItem),
				show: unref(variantModal),
				round: _ctx.$page.props.settings?.pos_design == "Modern",
				onClose: () => {
					unref(currentItem).variations = unref(currentItem).variations.filter((v) => v.id);
					unref(form).items = unref(form).items.map((i) => i.product_id == unref(currentItem).product_id ? unref(calculate_item)(unref(currentItem), unref(form).calculate_on) : i);
					variantModal.value = false;
				},
				onUpdate: (item) => {
					item.variations = item.variations.filter((v) => v.id);
					unref(form).items = unref(form).items.map((i) => i.product_id == item.product_id ? unref(calculate_item)(item, unref(form).calculate_on) : i);
					unref(saveForm)();
					variantModal.value = false;
					if (_ctx.$page.props.settings?.play_sound == 1) unref(playSuccessSound)();
				}
			}, null, _parent));
			else _push(`<!---->`);
			_push(ssrRenderComponent(unref(OpenOrder), {
				halls: __props.halls,
				onClose: unref(openOrder),
				loadOrder: unref(loadOrder),
				show: !unref(form).reference,
				onShowOpenOrders: () => {
					unref(form).reference = "f";
					showOrders.value = true;
				},
				onViewRegisterDetails: () => {
					unref(form).reference = "f";
					view_register.value = true;
				}
			}, null, _parent));
			_push(ssrRenderComponent(unref(_sfc_main$7), {
				round: true,
				"max-width": "xl",
				show: show_categories_modal.value,
				onClose: ($event) => show_categories_modal.value = false
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) {
						_push(`<div class="print:hidden"${_scopeId}><div class="border-b border-gray-200 p-4 sm:px-6 dark:border-gray-700"${_scopeId}><h3 class="text-base leading-6 font-semibold text-gray-900 dark:text-gray-100"${_scopeId}>${ssrInterpolate(_ctx.$t("Select {x}", { x: _ctx.$t("Category") }))}</h3><p class="mt-1 text-sm"${_scopeId}>${ssrInterpolate(_ctx.$t("Please select the category to load products"))}</p></div><div class="flex flex-col items-center bg-gray-100 p-8 dark:bg-gray-950"${_scopeId}><div class="inline-flex gap-4"${_scopeId}><button type="button" class="relative flex w-28 flex-col items-stretch justify-stretch gap-2 rounded-2xl bg-white p-4 text-sm font-bold shadow-lg hover:shadow-xl focus:ring-0 focus:outline-hidden dark:bg-gray-800 dark:hover:bg-gray-700"${_scopeId}>`);
						if (currentCategory.value.photo) _push(`<img${ssrRenderAttr("src", currentCategory.value.photo)} alt="" class="mx-auto h-8 w-8"${_scopeId}>`);
						else _push(`<!---->`);
						_push(` ${ssrInterpolate(currentCategory.value.name)} <div class="text-xs"${_scopeId}>(${ssrInterpolate(_ctx.$t("Main"))})</div><span class="absolute end-0 top-0 flex size-6 items-center justify-center overflow-hidden rounded-full bg-gray-200 text-xs group-hover:end-2 dark:bg-gray-700"${_scopeId}>${ssrInterpolate(currentCategory.value.products_count > 99 ? "99+" : currentCategory.value.products_count)}</span></button><!--[-->`);
						ssrRenderList(currentCategory.value.children, (cc) => {
							_push(`<button type="button" class="relative flex w-28 flex-col items-stretch justify-stretch gap-2 rounded-2xl bg-white p-4 text-sm shadow-lg hover:shadow-xl focus:ring-0 focus:outline-hidden dark:bg-gray-800 dark:hover:bg-gray-700"${_scopeId}>`);
							if (cc.photo) _push(`<img${ssrRenderAttr("src", cc.photo)} alt="" class="mx-auto h-8 w-8 rounded"${_scopeId}>`);
							else _push(`<!---->`);
							_push(` ${ssrInterpolate(cc.name)} <div class="text-xs"${_scopeId}>(${ssrInterpolate(_ctx.$t("Sub"))})</div><span class="absolute end-0 top-0 flex size-6 items-center justify-center overflow-hidden rounded-full bg-gray-200 text-xs group-hover:end-2 dark:bg-gray-700"${_scopeId}>${ssrInterpolate(cc.child_products_count > 99 ? "99+" : cc.child_products_count)}</span></button>`);
						});
						_push(`<!--]--></div></div></div>`);
					} else return [createVNode("div", { class: "print:hidden" }, [createVNode("div", { class: "border-b border-gray-200 p-4 sm:px-6 dark:border-gray-700" }, [createVNode("h3", { class: "text-base leading-6 font-semibold text-gray-900 dark:text-gray-100" }, toDisplayString(_ctx.$t("Select {x}", { x: _ctx.$t("Category") })), 1), createVNode("p", { class: "mt-1 text-sm" }, toDisplayString(_ctx.$t("Please select the category to load products")), 1)]), createVNode("div", { class: "flex flex-col items-center bg-gray-100 p-8 dark:bg-gray-950" }, [createVNode("div", { class: "inline-flex gap-4" }, [createVNode("button", {
						type: "button",
						onClick: () => {
							unref(getProducts)(currentCategory.value.id);
							show_categories_modal.value = false;
						},
						class: "relative flex w-28 flex-col items-stretch justify-stretch gap-2 rounded-2xl bg-white p-4 text-sm font-bold shadow-lg hover:shadow-xl focus:ring-0 focus:outline-hidden dark:bg-gray-800 dark:hover:bg-gray-700"
					}, [
						currentCategory.value.photo ? (openBlock(), createBlock("img", {
							key: 0,
							src: currentCategory.value.photo,
							alt: "",
							class: "mx-auto h-8 w-8"
						}, null, 8, ["src"])) : createCommentVNode("", true),
						createTextVNode(" " + toDisplayString(currentCategory.value.name) + " ", 1),
						createVNode("div", { class: "text-xs" }, "(" + toDisplayString(_ctx.$t("Main")) + ")", 1),
						createVNode("span", { class: "absolute end-0 top-0 flex size-6 items-center justify-center overflow-hidden rounded-full bg-gray-200 text-xs group-hover:end-2 dark:bg-gray-700" }, toDisplayString(currentCategory.value.products_count > 99 ? "99+" : currentCategory.value.products_count), 1)
					], 8, ["onClick"]), (openBlock(true), createBlock(Fragment, null, renderList(currentCategory.value.children, (cc) => {
						return openBlock(), createBlock("button", {
							key: cc.id,
							type: "button",
							onClick: () => {
								unref(getProducts)(cc.id);
								show_categories_modal.value = false;
							},
							class: "relative flex w-28 flex-col items-stretch justify-stretch gap-2 rounded-2xl bg-white p-4 text-sm shadow-lg hover:shadow-xl focus:ring-0 focus:outline-hidden dark:bg-gray-800 dark:hover:bg-gray-700"
						}, [
							cc.photo ? (openBlock(), createBlock("img", {
								key: 0,
								src: cc.photo,
								alt: "",
								class: "mx-auto h-8 w-8 rounded"
							}, null, 8, ["src"])) : createCommentVNode("", true),
							createTextVNode(" " + toDisplayString(cc.name) + " ", 1),
							createVNode("div", { class: "text-xs" }, "(" + toDisplayString(_ctx.$t("Sub")) + ")", 1),
							createVNode("span", { class: "absolute end-0 top-0 flex size-6 items-center justify-center overflow-hidden rounded-full bg-gray-200 text-xs group-hover:end-2 dark:bg-gray-700" }, toDisplayString(cc.child_products_count > 99 ? "99+" : cc.child_products_count), 1)
						], 8, ["onClick"]);
					}), 128))])])])];
				}),
				_: 1
			}, _parent));
			_push(ssrRenderComponent(unref(_sfc_main$7), {
				show: unref(openItemModal),
				"max-width": "xl",
				onClose: ($event) => openItemModal.value = false,
				overflow: true,
				backdrop: false,
				round: true
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) _push(ssrRenderComponent(unref(UpdateFormItem), {
						taxes: __props.taxes,
						selectedItem: unref(selectedItem),
						onRemove: (i) => unref(removeItem)(i),
						onClose: ($event) => openItemModal.value = false,
						onUpdate: (i) => unref(updatedOrderItem)(i),
						"onSelect:variant": (item) => {
							currentItem.value = item;
							variantModal.value = true;
						}
					}, null, _parent, _scopeId));
					else return [createVNode(unref(UpdateFormItem), {
						taxes: __props.taxes,
						selectedItem: unref(selectedItem),
						onRemove: (i) => unref(removeItem)(i),
						onClose: ($event) => openItemModal.value = false,
						onUpdate: (i) => unref(updatedOrderItem)(i),
						"onSelect:variant": (item) => {
							currentItem.value = item;
							variantModal.value = true;
						}
					}, null, 8, [
						"taxes",
						"selectedItem",
						"onRemove",
						"onClose",
						"onUpdate",
						"onSelect:variant"
					])];
				}),
				_: 1
			}, _parent));
			_push(ssrRenderComponent(unref(_sfc_main$7), {
				show: unref(showOrders),
				onClose: ($event) => showOrders.value = false,
				maxWidth: "xl",
				closeable: false,
				round: true
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) _push(ssrRenderComponent(unref(ShowOrders), {
						onLoadOrder: unref(loadOrder),
						onClose: ($event) => showOrders.value = false,
						onDeleteOrder: (id) => delete_order.value = id
					}, null, _parent, _scopeId));
					else return [createVNode(unref(ShowOrders), {
						onLoadOrder: unref(loadOrder),
						onClose: ($event) => showOrders.value = false,
						onDeleteOrder: (id) => delete_order.value = id
					}, null, 8, [
						"onLoadOrder",
						"onClose",
						"onDeleteOrder"
					])];
				}),
				_: 1
			}, _parent));
			_push(ssrRenderComponent(unref(_sfc_main$7), {
				show: unref(showQrOrders),
				onClose: ($event) => showQrOrders.value = false,
				maxWidth: "xl",
				closeable: false,
				round: true
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) _push(ssrRenderComponent(unref(ShowQrOrders), {
						onLoadOrder: unref(loadQrOrder),
						onClose: ($event) => showQrOrders.value = false
					}, null, _parent, _scopeId));
					else return [createVNode(unref(ShowQrOrders), {
						onLoadOrder: unref(loadQrOrder),
						onClose: ($event) => showQrOrders.value = false
					}, null, 8, ["onLoadOrder", "onClose"])];
				}),
				_: 1
			}, _parent));
			_push(ssrRenderComponent(unref(_sfc_main$7), {
				show: unref(printOrder),
				onClose: () => printOrder.value = false,
				maxWidth: "md",
				closeable: true,
				round: true
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) _push(ssrRenderComponent(unref(PrintOrder), {
						form: unref(form),
						halls: __props.halls,
						sendPrint: unref(sendToPPS),
						onClose: () => printOrder.value = false
					}, null, _parent, _scopeId));
					else return [createVNode(unref(PrintOrder), {
						form: unref(form),
						halls: __props.halls,
						sendPrint: unref(sendToPPS),
						onClose: () => printOrder.value = false
					}, null, 8, [
						"form",
						"halls",
						"sendPrint",
						"onClose"
					])];
				}),
				_: 1
			}, _parent));
			_push(ssrRenderComponent(unref(_sfc_main$7), {
				show: unref(printBill),
				onClose: () => printBill.value = false,
				maxWidth: "md",
				closeable: true,
				round: true
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) _push(ssrRenderComponent(unref(PrintBill), {
						form: unref(form),
						halls: __props.halls,
						sendPrint: unref(sendToPPS),
						onClose: () => printBill.value = false
					}, null, _parent, _scopeId));
					else return [createVNode(unref(PrintBill), {
						form: unref(form),
						halls: __props.halls,
						sendPrint: unref(sendToPPS),
						onClose: () => printBill.value = false
					}, null, 8, [
						"form",
						"halls",
						"sendPrint",
						"onClose"
					])];
				}),
				_: 1
			}, _parent));
			_push(ssrRenderComponent(unref(_sfc_main$7), {
				show: unref(showReceipt),
				onClose: () => showReceipt.value = false,
				maxWidth: "md",
				closeable: true,
				round: true
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) _push(ssrRenderComponent(unref(PrintReceipt), {
						receipt: unref(receipt),
						halls: __props.halls,
						sendPrint: unref(sendToPPS),
						onClose: () => showReceipt.value = false
					}, null, _parent, _scopeId));
					else return [createVNode(unref(PrintReceipt), {
						receipt: unref(receipt),
						halls: __props.halls,
						sendPrint: unref(sendToPPS),
						onClose: () => showReceipt.value = false
					}, null, 8, [
						"receipt",
						"halls",
						"sendPrint",
						"onClose"
					])];
				}),
				_: 1
			}, _parent));
			_push(ssrRenderComponent(unref(FinalizeSale), {
				form: unref(form),
				show: unref(finalize),
				saveForm: unref(saveForm),
				onFinalize: unref(handleSubmit),
				onClose: ($event) => finalize.value = false,
				custom_fields: __props.custom_fields,
				payment_fields: __props.payment_fields
			}, null, _parent));
			_push(ssrRenderComponent(unref(_sfc_main$7), {
				show: unref(order_discount),
				onClose: () => order_discount.value = false,
				maxWidth: "md",
				closeable: true,
				round: true
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) _push(ssrRenderComponent(unref(OrderDiscount), { onApply: unref(applyOrderDiscount) }, null, _parent, _scopeId));
					else return [createVNode(unref(OrderDiscount), { onApply: unref(applyOrderDiscount) }, null, 8, ["onApply"])];
				}),
				_: 1
			}, _parent));
			_push(ssrRenderComponent(unref(_sfc_main$7), {
				show: unref(addCustomerModal),
				onClose: ($event) => addCustomerModal.value = false,
				maxWidth: "3xl",
				closeable: true,
				round: true
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) _push(ssrRenderComponent(unref(CustomerForm), {
						keyboard: true,
						pos: 1,
						countries: __props.countries,
						custom_fields: __props.customer_fields,
						onClose: ($event) => addCustomerModal.value = false
					}, null, _parent, _scopeId));
					else return [createVNode(unref(CustomerForm), {
						keyboard: true,
						pos: 1,
						countries: __props.countries,
						custom_fields: __props.customer_fields,
						onClose: ($event) => addCustomerModal.value = false
					}, null, 8, [
						"countries",
						"custom_fields",
						"onClose"
					])];
				}),
				_: 1
			}, _parent));
			_push(ssrRenderComponent(unref(_sfc_main$7), {
				show: unref(showCustomer),
				onClose: ($event) => showCustomer.value = false,
				maxWidth: "lg",
				closeable: true,
				round: true
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) if (unref(customer)) _push(ssrRenderComponent(unref(ViewCustomer), {
						current: unref(customer),
						onClose: ($event) => showCustomer.value = false
					}, null, _parent, _scopeId));
					else _push(`<!---->`);
					else return [unref(customer) ? (openBlock(), createBlock(unref(ViewCustomer), {
						key: 0,
						current: unref(customer),
						onClose: ($event) => showCustomer.value = false
					}, null, 8, ["current", "onClose"])) : createCommentVNode("", true)];
				}),
				_: 1
			}, _parent));
			_push(ssrRenderComponent(unref(RegisterDetails), {
				show: unref(view_register),
				onClose: ($event) => view_register.value = false
			}, null, _parent));
			_push(ssrRenderComponent(unref(AddGiftCard), {
				show: unref(giftCardModal),
				onClose: (item) => {
					item && unref(addItem)(item);
					giftCardModal.value = false;
				}
			}, null, _parent));
			_push(ssrRenderComponent(unref(OpenRegister), {
				show: unref(open_register),
				onClose: ($event) => open_register.value = false
			}, null, _parent));
			_push(ssrRenderComponent(unref(_sfc_main$8), {
				show: unref(delete_order),
				onClose: () => delete_order.value = false,
				maxWidth: "sm",
				round: true
			}, {
				title: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) if (_ctx.property) _push(`<span${_scopeId}>${ssrInterpolate(_ctx.$t("Delete {x}", { x: _ctx.row[_ctx.property] }))}</span>`);
					else _push(`<span${_scopeId}>${ssrInterpolate(_ctx.$t("Delete Order"))} ${ssrInterpolate(unref(form)?.number)}</span>`);
					else return [_ctx.property ? (openBlock(), createBlock("span", { key: 0 }, toDisplayString(_ctx.$t("Delete {x}", { x: _ctx.row[_ctx.property] })), 1)) : (openBlock(), createBlock("span", { key: 1 }, toDisplayString(_ctx.$t("Delete Order")) + " " + toDisplayString(unref(form)?.number), 1))];
				}),
				content: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) _push(`<p${_scopeId}>${ssrInterpolate(_ctx.$t("Please confirm that you would like to delete the record?"))}</p>`);
					else return [createVNode("p", null, toDisplayString(_ctx.$t("Please confirm that you would like to delete the record?")), 1)];
				}),
				footer: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) {
						_push(ssrRenderComponent(unref(_sfc_main$1), {
							onClick: () => delete_order.value = false,
							class: "me-4"
						}, {
							default: withCtx((_, _push, _parent, _scopeId) => {
								if (_push) _push(`${ssrInterpolate(_ctx.$t("Cancel"))}`);
								else return [createTextVNode(toDisplayString(_ctx.$t("Cancel")), 1)];
							}),
							_: 1
						}, _parent, _scopeId));
						_push(ssrRenderComponent(unref(_sfc_main$9), { onClick: ($event) => unref(deleteOrder)(unref(delete_order)) }, {
							default: withCtx((_, _push, _parent, _scopeId) => {
								if (_push) _push(`${ssrInterpolate(_ctx.$t("Yes, delete"))}`);
								else return [createTextVNode(toDisplayString(_ctx.$t("Yes, delete")), 1)];
							}),
							_: 1
						}, _parent, _scopeId));
					} else return [createVNode(unref(_sfc_main$1), {
						onClick: () => delete_order.value = false,
						class: "me-4"
					}, {
						default: withCtx(() => [createTextVNode(toDisplayString(_ctx.$t("Cancel")), 1)]),
						_: 1
					}, 8, ["onClick"]), createVNode(unref(_sfc_main$9), { onClick: ($event) => unref(deleteOrder)(unref(delete_order)) }, {
						default: withCtx(() => [createTextVNode(toDisplayString(_ctx.$t("Yes, delete")), 1)]),
						_: 1
					}, 8, ["onClick"])];
				}),
				_: 1
			}, _parent));
			_push(ssrRenderComponent(_sfc_main$12, null, null, _parent));
			_push(ssrRenderComponent(unref(KeyBoard_default), null, null, _parent));
			_push(ssrRenderComponent(unref(_sfc_main$10), {
				show: scannerOpen.value,
				onScanned: handleBarcodeScan,
				onClose: ($event) => scannerOpen.value = false
			}, null, _parent));
			_push(ssrRenderComponent(_sfc_main$11, {
				halls: __props.halls,
				show: changeTableModal.value,
				onClose: ($event) => changeTableModal.value = false,
				onChanged: handleTableChange,
				currentHallId: unref(form).hall_id,
				currentTableId: unref(form).table_id
			}, null, _parent));
			_push(`</div><!--]-->`);
		};
	}
};
var _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
	const ssrContext = useSSRContext();
	(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/Pages/Sma/Pos/Modern.vue");
	return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
//#endregion
export { _sfc_main as default };
