import { t as _sfc_main$1 } from "./SecondaryButton-ub85RH3e.js";
import { A as _sfc_main$8, M as _sfc_main$6, k as _sfc_main$2, v as _sfc_main$4, vt as _sfc_main$5, w as _sfc_main$7, x as _sfc_main$3 } from "../ssr.js";
import { t as _sfc_main$9 } from "./AdminLayout-eZgRfDMK.js";
import { router } from "@inertiajs/vue3";
import { computed, createBlock, createCommentVNode, createTextVNode, createVNode, openBlock, ref, resolveComponent, toDisplayString, unref, useSSRContext, withCtx, withModifiers } from "vue";
import { ssrInterpolate, ssrRenderClass, ssrRenderComponent, ssrRenderList } from "vue/server-renderer";
//#region resources/js/Pages/Sma/Report/InventoryAccounting.vue
var _sfc_main = /* @__PURE__ */ Object.assign({ layout: _sfc_main$9 }, {
	__name: "InventoryAccounting",
	__ssrInlineRender: true,
	props: {
		summary: Object,
		pagination: Object,
		stores: Array,
		users: Array,
		filters: Object,
		method: String
	},
	setup(__props) {
		const props = __props;
		const form = ref(false);
		const searching = ref(false);
		const localFilters = ref({ ...props.filters });
		const methodLabels = {
			FIFO: "FIFO - First In First Out",
			LIFO: "LIFO - Last In First Out",
			AVCO: "AVCO - Average Cost",
			EXPF: "EXPF - Items Expiring Soon"
		};
		const typeLabels = {
			sale: "Sale",
			sale_return: "Sale Return",
			purchase_return: "Purchase Return"
		};
		const typeOptions = [
			{
				value: "",
				label: "All Types"
			},
			{
				value: "sale",
				label: "Sale"
			},
			{
				value: "sale_return",
				label: "Sale Return"
			},
			{
				value: "purchase_return",
				label: "Purchase Return"
			}
		];
		const pageTotalCost = computed(() => props.pagination?.data?.reduce((sum, entry) => sum + Number(entry.total_cost), 0) || 0);
		const pageTotalQuantity = computed(() => props.pagination?.data?.reduce((sum, entry) => sum + Number(entry.quantity), 0) || 0);
		const closeForm = () => {
			form.value = false;
		};
		const applyFilters = () => {
			const formData = Object.entries(localFilters.value).reduce((a, [k, v]) => v ? (a[k] = v, a) : a, {});
			router.visit(route("inventory_accounting.report", Object.keys(formData).length ? { filters: formData } : ""), {
				preserveScroll: true,
				onStart: () => searching.value = true,
				onFinish: () => {
					searching.value = false;
					form.value = false;
				}
			});
		};
		const resetFilters = () => {
			localFilters.value = {};
			applyFilters();
		};
		function getReference(row) {
			if (row.type === "sale" || row.type === "sale_return") return row.sale_item?.sale?.reference || "-";
			if (row.type === "purchase_return") return row.return_order_item?.return_order?.reference || "-";
			return "-";
		}
		function getPurchaseRef(row) {
			return row.purchase_item?.purchase?.reference || (row.purchase_item_id ? "#" + row.purchase_item_id : "Fallback");
		}
		return (_ctx, _push, _parent, _attrs) => {
			const _component_Head = resolveComponent("Head");
			const _component_Header = resolveComponent("Header");
			_push(`<!--[-->`);
			_push(ssrRenderComponent(_component_Head, null, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) _push(`<title${_scopeId}>${ssrInterpolate(_ctx.$t("Inventory Accounting Report"))}</title>`);
					else return [createVNode("title", null, toDisplayString(_ctx.$t("Inventory Accounting Report")), 1)];
				}),
				_: 1
			}, _parent));
			_push(ssrRenderComponent(_component_Header, null, {
				subheading: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) {
						_push(`<div${_scopeId}>${ssrInterpolate(_ctx.$t("Cost allocation details using {method}", { method: methodLabels[__props.method] || __props.method }))}</div>`);
						if (__props.filters && Object.keys(__props.filters).filter((k) => __props.filters[k] && k !== "sort").length > 0) {
							_push(`<div class="mt-1 flex flex-wrap items-center gap-x-6 gap-y-1 text-sm font-bold text-primary-700 dark:text-primary-400"${_scopeId}>${ssrInterpolate(_ctx.$t("Filters Applied"))}: `);
							if (__props.filters.start_date) _push(`<span${_scopeId}>${ssrInterpolate(_ctx.$t("From"))}: ${ssrInterpolate(_ctx.$date(__props.filters.start_date.toString(), null, null, true))}</span>`);
							else _push(`<!---->`);
							if (__props.filters.end_date) _push(`<span${_scopeId}>${ssrInterpolate(_ctx.$t("To"))}: ${ssrInterpolate(_ctx.$date(__props.filters.end_date.toString(), null, null, true))}</span>`);
							else _push(`<!---->`);
							if (__props.filters.store_id) _push(`<span${_scopeId}>${ssrInterpolate(_ctx.$t("Store"))}: ${ssrInterpolate(__props.stores.find((s) => s.value == __props.filters.store_id)?.label || "")}</span>`);
							else _push(`<!---->`);
							if (__props.filters.type) _push(`<span${_scopeId}>${ssrInterpolate(_ctx.$t("Type"))}: ${ssrInterpolate(_ctx.$t(typeLabels[__props.filters.type] || __props.filters.type))}</span>`);
							else _push(`<!---->`);
							_push(`</div>`);
						} else _push(`<!---->`);
					} else return [createVNode("div", null, toDisplayString(_ctx.$t("Cost allocation details using {method}", { method: methodLabels[__props.method] || __props.method })), 1), __props.filters && Object.keys(__props.filters).filter((k) => __props.filters[k] && k !== "sort").length > 0 ? (openBlock(), createBlock("div", {
						key: 0,
						class: "mt-1 flex flex-wrap items-center gap-x-6 gap-y-1 text-sm font-bold text-primary-700 dark:text-primary-400"
					}, [
						createTextVNode(toDisplayString(_ctx.$t("Filters Applied")) + ": ", 1),
						__props.filters.start_date ? (openBlock(), createBlock("span", { key: 0 }, toDisplayString(_ctx.$t("From")) + ": " + toDisplayString(_ctx.$date(__props.filters.start_date.toString(), null, null, true)), 1)) : createCommentVNode("", true),
						__props.filters.end_date ? (openBlock(), createBlock("span", { key: 1 }, toDisplayString(_ctx.$t("To")) + ": " + toDisplayString(_ctx.$date(__props.filters.end_date.toString(), null, null, true)), 1)) : createCommentVNode("", true),
						__props.filters.store_id ? (openBlock(), createBlock("span", { key: 2 }, toDisplayString(_ctx.$t("Store")) + ": " + toDisplayString(__props.stores.find((s) => s.value == __props.filters.store_id)?.label || ""), 1)) : createCommentVNode("", true),
						__props.filters.type ? (openBlock(), createBlock("span", { key: 3 }, toDisplayString(_ctx.$t("Type")) + ": " + toDisplayString(_ctx.$t(typeLabels[__props.filters.type] || __props.filters.type)), 1)) : createCommentVNode("", true)
					])) : createCommentVNode("", true)];
				}),
				menu: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) {
						_push(`<div class="flex items-center justify-center gap-4"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$2), {
							type: "button",
							onClick: ($event) => form.value = true
						}, {
							default: withCtx((_, _push, _parent, _scopeId) => {
								if (_push) _push(`${ssrInterpolate(_ctx.$t("Customize"))}`);
								else return [createTextVNode(toDisplayString(_ctx.$t("Customize")), 1)];
							}),
							_: 1
						}, _parent, _scopeId));
						_push(`</div>`);
					} else return [createVNode("div", { class: "flex items-center justify-center gap-4" }, [createVNode(unref(_sfc_main$2), {
						type: "button",
						onClick: ($event) => form.value = true
					}, {
						default: withCtx(() => [createTextVNode(toDisplayString(_ctx.$t("Customize")), 1)]),
						_: 1
					}, 8, ["onClick"])])];
				}),
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) _push(`${ssrInterpolate(_ctx.$t("Inventory Accounting Report"))} `);
					else return [createTextVNode(toDisplayString(_ctx.$t("Inventory Accounting Report")) + " ", 1)];
				}),
				_: 1
			}, _parent));
			if (__props.summary) _push(`<dl class="grid grid-cols-1 gap-px border-b border-gray-200 bg-gray-200 sm:grid-cols-2 lg:grid-cols-4 dark:border-gray-700 dark:bg-gray-700"><div class="flex flex-wrap items-baseline justify-between bg-white px-4 py-5 sm:px-6 xl:px-8 dark:bg-gray-900"><div><dt class="text-mute text-sm leading-6 font-medium">${ssrInterpolate(_ctx.$t("Total COGS"))}</dt><dd class="text-focus w-full flex-none text-3xl leading-10 font-medium tracking-tight">${ssrInterpolate(_ctx.$currency(__props.summary.total_cogs))}</dd><dd class="text-mute text-sm">${ssrInterpolate(_ctx.$number_qty(__props.summary.total_sold_quantity))} ${ssrInterpolate(_ctx.$t("units sold"))}</dd></div></div><div class="flex flex-wrap items-baseline justify-between bg-white px-4 py-5 sm:px-6 xl:px-8 dark:bg-gray-900"><div><dt class="text-mute text-sm leading-6 font-medium">${ssrInterpolate(_ctx.$t("Net COGS"))}</dt><dd class="${ssrRenderClass([__props.summary.net_cogs >= 0 ? "text-focus" : "text-red-600 dark:text-red-400", "w-full flex-none text-3xl leading-10 font-medium tracking-tight"])}">${ssrInterpolate(_ctx.$currency(__props.summary.net_cogs))}</dd><dd class="text-mute text-sm">${ssrInterpolate(_ctx.$t("After returns"))}</dd></div></div><div class="flex flex-wrap items-baseline justify-between bg-white px-4 py-5 sm:px-6 xl:px-8 dark:bg-gray-900"><div><dt class="text-mute text-sm leading-6 font-medium">${ssrInterpolate(_ctx.$t("Sale Returns Cost"))}</dt><dd class="w-full flex-none text-3xl leading-10 font-medium tracking-tight text-green-600 dark:text-green-400">${ssrInterpolate(_ctx.$currency(__props.summary.total_sale_return_cost))}</dd><dd class="text-mute text-sm">${ssrInterpolate(_ctx.$number_qty(__props.summary.total_returned_quantity))} ${ssrInterpolate(_ctx.$t("units returned"))}</dd></div></div><div class="flex flex-wrap items-baseline justify-between bg-white px-4 py-5 sm:px-6 xl:px-8 dark:bg-gray-900"><div><dt class="text-mute text-sm leading-6 font-medium">${ssrInterpolate(_ctx.$t("Fallback Cost"))}</dt><dd class="w-full flex-none text-3xl leading-10 font-medium tracking-tight text-amber-600 dark:text-amber-400">${ssrInterpolate(_ctx.$currency(__props.summary.fallback_cost))}</dd><dd class="text-mute text-sm">${ssrInterpolate(_ctx.$t("No purchase lot"))}</dd></div></div></dl>`);
			else _push(`<!---->`);
			_push(`<div class="border-b border-gray-200 bg-gray-50 px-4 pt-4 pb-5 sm:px-6 lg:px-8 dark:border-gray-700 dark:bg-gray-900/50"><h3 class="text-focus mb-2 text-base leading-7 font-semibold">${ssrInterpolate(_ctx.$t("Summary"))}</h3><div class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4"><div class="rounded-lg bg-white p-4 shadow-sm dark:bg-gray-900"><p class="text-mute text-sm">${ssrInterpolate(_ctx.$t("Costing Method"))}</p><p class="text-focus text-xl font-semibold">${ssrInterpolate(methodLabels[__props.method] || __props.method)}</p></div><div class="rounded-lg bg-white p-4 shadow-sm dark:bg-gray-900"><p class="text-mute text-sm">${ssrInterpolate(_ctx.$t("Total Allocations"))}</p><p class="text-focus text-xl font-semibold">${ssrInterpolate(_ctx.$number(__props.summary?.total_allocations || 0, null, { maximumFractionDigits: 0 }))}</p></div><div class="rounded-lg bg-white p-4 shadow-sm dark:bg-gray-900"><p class="text-mute text-sm">${ssrInterpolate(_ctx.$t("Purchase Return Cost"))}</p><p class="text-xl font-semibold text-red-600 dark:text-red-400">${ssrInterpolate(_ctx.$currency(__props.summary?.total_purchase_return_cost || 0))}</p></div><div class="rounded-lg bg-white p-4 shadow-sm dark:bg-gray-900"><p class="text-mute text-sm">${ssrInterpolate(_ctx.$t("Avg Unit Cost"))}</p><p class="text-focus text-xl font-semibold">${ssrInterpolate(__props.summary?.total_sold_quantity > 0 ? _ctx.$currency(__props.summary.total_cogs / __props.summary.total_sold_quantity) : _ctx.$currency(0))}</p></div></div></div><div class="relative flex grow flex-col items-stretch justify-stretch self-stretch bg-white px-4 sm:px-6 lg:px-8 dark:bg-gray-800">`);
			if (searching.value) _push(ssrRenderComponent(unref(_sfc_main$3), { "circle-size": "w-10 h-10" }, null, _parent));
			else _push(`<!---->`);
			_push(`<div class="py-4"><h3 class="text-focus text-base leading-7 font-semibold">${ssrInterpolate(_ctx.$t("Cost Allocations"))}</h3><p class="text-mute text-sm">${ssrInterpolate(_ctx.$t("Individual lot consumption records"))}</p></div><div class="flow-root grow"><div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"><div class="mt-2 inline-block min-w-full border-b border-gray-200 align-middle dark:border-gray-700"><table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700"><thead class="bg-gray-50 dark:bg-gray-900/50"><tr><th scope="col" class="text-focus py-3.5 ps-4 pe-3 text-start text-sm font-semibold sm:ps-6 lg:ps-8">${ssrInterpolate(_ctx.$t("Date"))}</th><th scope="col" class="text-focus px-3 py-3.5 text-center text-sm font-semibold">${ssrInterpolate(_ctx.$t("Type"))}</th><th scope="col" class="text-focus px-3 py-3.5 text-start text-sm font-semibold">${ssrInterpolate(_ctx.$t("Product"))}</th><th scope="col" class="text-focus px-3 py-3.5 text-start text-sm font-semibold">${ssrInterpolate(_ctx.$t("Reference"))}</th><th scope="col" class="text-focus px-3 py-3.5 text-start text-sm font-semibold">${ssrInterpolate(_ctx.$t("Purchase Lot"))}</th><th scope="col" class="text-focus px-3 py-3.5 text-end text-sm font-semibold">${ssrInterpolate(_ctx.$t("Quantity"))}</th><th scope="col" class="text-focus px-3 py-3.5 text-end text-sm font-semibold">${ssrInterpolate(_ctx.$t("Unit Cost"))}</th><th scope="col" class="text-focus py-3.5 ps-3 pe-4 text-end text-sm font-semibold sm:pe-6 lg:pe-8">${ssrInterpolate(_ctx.$t("Total Cost"))}</th></tr></thead><tbody class="divide-y divide-gray-200 bg-white dark:divide-gray-700 dark:bg-gray-900">`);
			if (__props.pagination && __props.pagination.data.length) {
				_push(`<!--[-->`);
				ssrRenderList(__props.pagination.data, (row) => {
					_push(`<tr><td class="w-36 py-4 ps-4 pe-3 text-sm whitespace-nowrap sm:ps-6 lg:ps-8">${ssrInterpolate(_ctx.$datetime(row.created_at))}</td><td class="w-20 px-3 py-2 text-center text-sm whitespace-nowrap"><span class="${ssrRenderClass([{
						"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300": row.type === "sale",
						"bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-300": row.type === "sale_return",
						"bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-300": row.type === "purchase_return"
					}, "mx-auto inline-flex items-center rounded-full px-2 py-1 text-xs font-medium"])}">${ssrInterpolate(_ctx.$t(typeLabels[row.type] || row.type))}</span></td><td class="px-3 py-4 text-sm whitespace-nowrap"><div>${ssrInterpolate(row.product?.name || "-")}</div>`);
					if (row.variation) _push(`<div class="text-mute text-xs">${ssrInterpolate(row.variation.code)}</div>`);
					else _push(`<!---->`);
					_push(`</td><td class="px-3 py-4 text-sm whitespace-nowrap">${ssrInterpolate(getReference(row))}</td><td class="px-3 py-4 text-sm whitespace-nowrap">`);
					if (row.purchase_item) {
						_push(`<!--[--><div>${ssrInterpolate(getPurchaseRef(row))}</div>`);
						if (row.purchase_item.batch_no) _push(`<div class="text-mute text-xs">${ssrInterpolate(_ctx.$t("Batch"))}: ${ssrInterpolate(row.purchase_item.batch_no)}</div>`);
						else _push(`<!---->`);
						_push(`<!--]-->`);
					} else _push(`<span class="text-mute italic">${ssrInterpolate(_ctx.$t("Fallback"))}</span>`);
					_push(`</td><td class="w-28 px-3 py-4 text-end text-sm whitespace-nowrap">${ssrInterpolate(_ctx.$number_qty(row.quantity))}</td><td class="w-28 px-3 py-4 text-end text-sm whitespace-nowrap">${ssrInterpolate(_ctx.$currency(row.unit_cost))}</td><td class="w-36 py-4 ps-3 pe-4 text-end text-sm font-medium whitespace-nowrap sm:pe-6 lg:pe-8">${ssrInterpolate(_ctx.$currency(row.total_cost))}</td></tr>`);
				});
				_push(`<!--]-->`);
			} else _push(`<tr><td colspan="8" class="py-8 text-center"><p class="text-mute text-sm">${ssrInterpolate(_ctx.$t("No cost allocations found for the selected period"))}</p></td></tr>`);
			_push(`</tbody>`);
			if (__props.pagination && __props.pagination.data.length) _push(`<tfoot class="border-t border-gray-300 bg-gray-50 dark:border-gray-600 dark:bg-gray-900/50"><tr><td colspan="5" class="py-4 ps-4 pe-3 text-sm font-semibold sm:ps-6 lg:ps-8">${ssrInterpolate(_ctx.$t("Page Totals"))}</td><td class="px-3 py-4 text-end text-sm font-semibold">${ssrInterpolate(_ctx.$number_qty(pageTotalQuantity.value))}</td><td class="px-3 py-4 text-end text-sm font-semibold"> </td><td class="py-4 ps-3 pe-4 text-end text-sm font-semibold sm:pe-6 lg:pe-8">${ssrInterpolate(_ctx.$currency(pageTotalCost.value))}</td></tr></tfoot>`);
			else _push(`<!---->`);
			_push(`</table></div></div></div><div class="-mx-4 sm:-mx-6 lg:-mx-8">`);
			_push(ssrRenderComponent(unref(_sfc_main$4), {
				class: "mx-4 mt-auto pt-4 pb-2 text-sm sm:mx-6",
				meta: {
					...__props.pagination.meta,
					links: __props.pagination.links
				},
				links: {
					prev: __props.pagination.links[0].url,
					next: __props.pagination.links[__props.pagination.links.length - 1].url
				}
			}, null, _parent));
			_push(`</div></div>`);
			_push(ssrRenderComponent(unref(_sfc_main$5), {
				show: form.value,
				onClose: closeForm,
				"max-width": "lg"
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) {
						_push(`<form${_scopeId}><div class="border-b border-gray-200 px-6 py-4 dark:border-gray-700"${_scopeId}><div class="sm:flex sm:items-baseline sm:justify-between"${_scopeId}><div class="sm:w-0 sm:flex-1"${_scopeId}><h1 class="text-focus text-base font-semibold"${_scopeId}>${ssrInterpolate(_ctx.$t("Customize Report"))}</h1><p class="text-mute mt-1 truncate text-sm"${_scopeId}>${ssrInterpolate(_ctx.$t("Please select the desired filters below."))}</p></div></div></div><div class="grid grid-cols-6 gap-6 p-6"${_scopeId}><div class="col-span-6 sm:col-span-3"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$6), {
							json: true,
							id: "store_id",
							clearable: true,
							searchable: false,
							label: _ctx.$t("Store"),
							suggestions: __props.stores,
							modelValue: localFilters.value.store_id,
							"onUpdate:modelValue": ($event) => localFilters.value.store_id = $event
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-3"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$6), {
							json: true,
							id: "type",
							clearable: true,
							searchable: false,
							label: _ctx.$t("Type"),
							suggestions: typeOptions,
							modelValue: localFilters.value.type,
							"onUpdate:modelValue": ($event) => localFilters.value.type = $event
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-3"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$7), {
							id: "start_date",
							label: _ctx.$t("Start Date"),
							modelValue: localFilters.value.start_date,
							"onUpdate:modelValue": ($event) => localFilters.value.start_date = $event
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-3"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$7), {
							id: "end_date",
							label: _ctx.$t("End Date"),
							modelValue: localFilters.value.end_date,
							"onUpdate:modelValue": ($event) => localFilters.value.end_date = $event
						}, null, _parent, _scopeId));
						_push(`</div></div><div class="flex flex-row justify-between rounded-b-lg bg-gray-100 px-6 py-4 dark:bg-gray-950"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$2), {
							type: "button",
							onClick: resetFilters,
							class: "text-red-600 hover:text-red-700"
						}, {
							default: withCtx((_, _push, _parent, _scopeId) => {
								if (_push) _push(`${ssrInterpolate(_ctx.$t("Reset Filters"))}`);
								else return [createTextVNode(toDisplayString(_ctx.$t("Reset Filters")), 1)];
							}),
							_: 1
						}, _parent, _scopeId));
						_push(`<div class="flex gap-3"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$1), { onClick: closeForm }, {
							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$8), { loading: searching.value }, {
							default: withCtx((_, _push, _parent, _scopeId) => {
								if (_push) _push(`${ssrInterpolate(_ctx.$t("Apply"))}`);
								else return [createTextVNode(toDisplayString(_ctx.$t("Apply")), 1)];
							}),
							_: 1
						}, _parent, _scopeId));
						_push(`</div></div></form>`);
					} else return [createVNode("form", { onSubmit: withModifiers(applyFilters, ["prevent"]) }, [
						createVNode("div", { class: "border-b border-gray-200 px-6 py-4 dark:border-gray-700" }, [createVNode("div", { class: "sm:flex sm:items-baseline sm:justify-between" }, [createVNode("div", { class: "sm:w-0 sm:flex-1" }, [createVNode("h1", { class: "text-focus text-base font-semibold" }, toDisplayString(_ctx.$t("Customize Report")), 1), createVNode("p", { class: "text-mute mt-1 truncate text-sm" }, toDisplayString(_ctx.$t("Please select the desired filters below.")), 1)])])]),
						createVNode("div", { class: "grid grid-cols-6 gap-6 p-6" }, [
							createVNode("div", { class: "col-span-6 sm:col-span-3" }, [createVNode(unref(_sfc_main$6), {
								json: true,
								id: "store_id",
								clearable: true,
								searchable: false,
								label: _ctx.$t("Store"),
								suggestions: __props.stores,
								modelValue: localFilters.value.store_id,
								"onUpdate:modelValue": ($event) => localFilters.value.store_id = $event
							}, null, 8, [
								"label",
								"suggestions",
								"modelValue",
								"onUpdate:modelValue"
							])]),
							createVNode("div", { class: "col-span-6 sm:col-span-3" }, [createVNode(unref(_sfc_main$6), {
								json: true,
								id: "type",
								clearable: true,
								searchable: false,
								label: _ctx.$t("Type"),
								suggestions: typeOptions,
								modelValue: localFilters.value.type,
								"onUpdate:modelValue": ($event) => localFilters.value.type = $event
							}, null, 8, [
								"label",
								"modelValue",
								"onUpdate:modelValue"
							])]),
							createVNode("div", { class: "col-span-6 sm:col-span-3" }, [createVNode(unref(_sfc_main$7), {
								id: "start_date",
								label: _ctx.$t("Start Date"),
								modelValue: localFilters.value.start_date,
								"onUpdate:modelValue": ($event) => localFilters.value.start_date = $event
							}, null, 8, [
								"label",
								"modelValue",
								"onUpdate:modelValue"
							])]),
							createVNode("div", { class: "col-span-6 sm:col-span-3" }, [createVNode(unref(_sfc_main$7), {
								id: "end_date",
								label: _ctx.$t("End Date"),
								modelValue: localFilters.value.end_date,
								"onUpdate:modelValue": ($event) => localFilters.value.end_date = $event
							}, null, 8, [
								"label",
								"modelValue",
								"onUpdate:modelValue"
							])])
						]),
						createVNode("div", { class: "flex flex-row justify-between rounded-b-lg bg-gray-100 px-6 py-4 dark:bg-gray-950" }, [createVNode(unref(_sfc_main$2), {
							type: "button",
							onClick: resetFilters,
							class: "text-red-600 hover:text-red-700"
						}, {
							default: withCtx(() => [createTextVNode(toDisplayString(_ctx.$t("Reset Filters")), 1)]),
							_: 1
						}), createVNode("div", { class: "flex gap-3" }, [createVNode(unref(_sfc_main$1), { onClick: closeForm }, {
							default: withCtx(() => [createTextVNode(toDisplayString(_ctx.$t("Cancel")), 1)]),
							_: 1
						}), createVNode(unref(_sfc_main$8), { loading: searching.value }, {
							default: withCtx(() => [createTextVNode(toDisplayString(_ctx.$t("Apply")), 1)]),
							_: 1
						}, 8, ["loading"])])])
					], 32)];
				}),
				_: 1
			}, _parent));
			_push(`<!--]-->`);
		};
	}
});
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/Report/InventoryAccounting.vue");
	return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
//#endregion
export { _sfc_main as default };
