import{_ as x,g as f,r as m,o as a,c as e,a as t,t as n,H as i,I as _,J as p,m as d}from"./entry-0f1e2bcf.mjs";const y={props:{cartData:{type:Object,default(){return{}}}},emits:["showdisdetail"],setup(c,{emit:h}){return f(),{showcountdetail:m(!1),showdisdetail:async(u,g,s)=>{h("showdisdetail",{discount_id:u,type:g,isdiscount:s})}}}},D={class:"flex-col md:flex justify-end items-end py-3 font-bold w-full"},k={class:"my-3 px-3 grid grid-cols-5"},v={class:"col-span-4 text-sm md:text-base"},w={class:"col-span-1 text-right"},b=t("span",{class:"text-xs"}," TWD ",-1),T={class:"col-span-4 text-sm md:text-base"},W={class:"col-span-1 text-right"},C=i(" - "),F=t("span",{class:"text-xs"}," TWD ",-1),j={key:0},B={key:1},I={key:0,class:"col-span-5"},N={class:"col-span-2 text-xs md:text-sm"},V=t("span",{class:"pl-2 font-extralight"},"\u2514 ",-1),S=["onClick"],q={key:0,class:"col-span-2 text-right"},A=t("span",{class:"text-xs"}," TWD ",-1),E={key:1,class:"col-span-2 text-right"},H={class:"col-span-2 text-xs md:text-sm"},J=t("span",{class:"pl-2 font-extralight"},"\u2514 ",-1),L=["onClick"],O={class:"col-span-2 text-right"},$=t("span",{class:"text-xs"}," TWD ",-1),z={key:1,class:"col-span-4 text-sm md:text-base"},G={key:2,class:"col-span-5"},K={key:0,class:"col-span-2 text-xs md:text-sm"},M=t("span",{class:"pl-2 font-extralight"},"\u2514 ",-1),P={key:1,class:"col-span-2 text-right"},Q=t("span",{class:"text-xs"}," TWD ",-1),R={class:"flex justify-end border-t my-2 px-3"},U={key:0,class:"font-bold"},X=t("span",{class:"text-sm"},"TWD ",-1);function Y(c,h,o,l,u,g){return a(),e("div",D,[t("div",k,[t("div",v,n(c.$langt("\u5546\u54C1\u91D1\u984D")),1),t("div",w,[b,i(" "+n(c.$priceformat(o.cartData.subamount)),1)]),t("div",T,n(c.$langt("\u4FC3\u92B7\u6298\u6263")),1),t("div",W,[C,F,o.cartData.discount_mapping?(a(),e("span",j,n(c.$priceformat(o.cartData.discount)),1)):(a(),e("span",B,"0"))]),o.cartData.discount_mapping?(a(),e("div",I,[(a(!0),e(_,null,p(o.cartData.discount_mapping.cart,s=>(a(),e("p",{key:s.discount_id,class:"grid grid-cols-4 gap-4 text-gray-500"},[t("span",N,[V,i(n(s.name)+" ",1),t("span",{class:"text-red-500 cursor-pointer",onClick:r=>l.showdisdetail(s.discount_id,"cart",!0)}," ("+n(c.$langt("\u4E86\u89E3\u8A73\u60C5"))+") ",9,S)]),s.discount_type==="1"?(a(),e("span",q,[A,i(" "+n(s.discount_value),1)])):s.discount_type==="2"?(a(),e("span",E,n(s.discount_value)+" %off ",1)):d("",!0)]))),128)),(a(!0),e(_,null,p(o.cartData.discount_mapping.item,s=>(a(),e("p",{key:s.discount_id,class:"grid grid-cols-4 gap-4 text-gray-500"},[t("span",H,[J,i(n(s.name)+" ",1),t("span",{class:"text-red-500 cursor-pointer",onClick:r=>l.showdisdetail(s.discount_id,"items",!0)}," ("+n(c.$langt("\u4E86\u89E3\u8A73\u60C5"))+") ",9,L)]),t("span",O,[$,i(" "+n(s.discount),1)])]))),128))])):d("",!0),o.cartData.assignFre&&o.cartData.assignFre.length?(a(),e("div",z,n(c.$langt("\u904B\u8CBB")),1)):d("",!0),o.cartData.assignFre?(a(),e("div",G,[(a(!0),e(_,null,p(o.cartData.assignFre,(s,r)=>(a(),e("p",{key:r,class:"grid grid-cols-4 gap-4 text-gray-500"},[s.fee_freight!==null?(a(),e("span",K,[M,i(" "+n(s.name),1)])):d("",!0),s.fee_freight!==null?(a(),e("span",P,[Q,i(" "+n(c.$priceformat(parseInt(s.fee_freight)*parseInt(s.qty))),1)])):d("",!0)]))),128))])):d("",!0)]),t("div",R,[o.cartData?(a(),e("span",U,[X,i(" "+n(c.$priceformat(o.cartData.amount)),1)])):d("",!0)])])}var ss=x(y,[["render",Y]]);export{ss as default};
