import{c as m,b as t,d as a,t as s,n as u,o as c}from"./app-CYVHboi-.js";import"./browser-BwNzv7vE.js";const b={class:"flex items-center justify-between text-xs"},f={class:"flex items-center justify-between text-xs"},y={class:"flex items-center justify-between text-xs"},$={class:"flex items-center justify-between text-xs"},p={class:"flex items-center justify-between text-sm font-bold"},g={class:"text-lg font-bold"},h={__name:"OrderSummary",props:["form"],emits:["discount"],setup(o,{emit:l}){const d=l;return(e,i)=>(c(),m("div",{class:u(["flex flex-col gap-1 print:border-t print:shadow-none",e.$page.props.settings?.pos_design=="Modern"?"":"rounded-md bg-gray-100 px-3 py-2 shadow-inner dark:bg-gray-800"])},[t("div",b,[a(s(e.$t("Items"))+" ",1),t("span",null,s(o.form.items.length)+" ("+s(e.$decimal_qty(o.form.items.reduce((n,r)=>Number(r.quantity)+n,0)))+") ",1)]),t("div",f,[a(s(e.$t("Subtotal"))+" ",1),t("span",null,s(e.$currency(o.form.items.reduce((n,r)=>Number(e.$decimal(r.subtotal))+n,0))),1)]),t("div",y,[t("button",{type:"button",class:"link",onClick:i[0]||(i[0]=n=>d("discount"))},s(e.$t("Discount")),1),t("span",null,s(e.$currency(o.form.items.reduce((n,r)=>Number(e.$decimal(r.total_discount_amount))+n,0))),1)]),t("div",$,[a(s(e.$t("Tax"))+" ",1),t("span",null,s(e.$currency(o.form.items.reduce((n,r)=>Number(e.$decimal(r.total_tax_amount))+n,0))),1)]),i[1]||(i[1]=t("div",{class:"mt-1 border-t-2 border-dashed dark:border-gray-500 print:border-solid"},null,-1)),t("div",p,[a(s(e.$t("Payable"))+" ",1),t("span",g,s(e.$currency(o.form.items.reduce((n,r)=>Number(e.$decimal(r.total))+n,0))),1)])],2))}};export{h as default};
