import { t as __exportAll } from "./rolldown-runtime-rSIU-vHC.js";
import { mergeProps, useSSRContext } from "vue";
import { ssrInterpolate, ssrRenderAttrs } from "vue/server-renderer";
//#region resources/js/Pages/Sma/Pos/Components/OrderSummary.vue
var OrderSummary_exports = /* @__PURE__ */ __exportAll({ default: () => _sfc_main });
var _sfc_main = {
	__name: "OrderSummary",
	__ssrInlineRender: true,
	props: ["form"],
	emits: ["discount"],
	setup(__props, { emit: __emit }) {
		return (_ctx, _push, _parent, _attrs) => {
			_push(`<div${ssrRenderAttrs(mergeProps({ class: ["flex flex-col gap-1 print:border-t print:shadow-none", _ctx.$page.props.settings?.pos_design == "Modern" ? "" : "rounded-md bg-gray-100 px-3 py-2 shadow-inner dark:bg-gray-800"] }, _attrs))}><div class="flex items-center justify-between text-xs">${ssrInterpolate(_ctx.$t("Items"))} <span>${ssrInterpolate(__props.form.items.length)} (${ssrInterpolate(_ctx.$decimal_qty(__props.form.items.reduce((a, i) => Number(i.quantity) + a, 0)))}) </span></div><div class="flex items-center justify-between text-xs">${ssrInterpolate(_ctx.$t("Subtotal"))} <span>${ssrInterpolate(_ctx.$currency(__props.form.items.reduce((a, i) => Number(_ctx.$decimal(i.subtotal)) + a, 0)))}</span></div><div class="flex items-center justify-between text-xs"><button type="button" class="link">${ssrInterpolate(_ctx.$t("Discount"))}</button><span>${ssrInterpolate(_ctx.$currency(__props.form.items.reduce((a, i) => Number(_ctx.$decimal(i.total_discount_amount)) + a, 0)))}</span></div><div class="flex items-center justify-between text-xs">${ssrInterpolate(_ctx.$t("Tax"))} <span>${ssrInterpolate(_ctx.$currency(__props.form.items.reduce((a, i) => Number(_ctx.$decimal(i.total_tax_amount)) + a, 0)))}</span></div><div class="mt-1 border-t-2 border-dashed dark:border-gray-500 print:border-solid"></div><div class="flex items-center justify-between text-sm font-bold">${ssrInterpolate(_ctx.$t("Payable"))} <span class="text-lg font-bold">${ssrInterpolate(_ctx.$currency(__props.form.items.reduce((a, i) => Number(_ctx.$decimal(i.total)) + a, 0)))}</span></div></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/Components/OrderSummary.vue");
	return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
//#endregion
export { _sfc_main as n, OrderSummary_exports as t };
