1import{_ as M,a as q,b as G,c as W,d as X}from"./D7C_J7KK.js";import{f as C,c as h,y as f,m as e,o as l,t as k,n as U,b as t,a,w as i,e as V,d as H,bj as A,W as O,i as P,b7 as J,k as K,bk as Q,a8 as R,b1 as Y,C as Z,a0 as ee,a3 as te,G as ne,F as oe,r as se,am as B}from"./DrNdd5RP.js";import{_ as ae,a as ie,b as ce}from"./CLg7wHVy.js";import{_ as le}from"./D8PwBCUV.js";import{i as re,u as _e,p as me}from"./DlaXsH5y.js";import{_ as ue}from"./BDezccEF.js";import{_ as pe}from"./FKsaOomn.js";import{d as de,a as he,_ as fe,b as be,c as ve}from"./DrUVB3qX.js";import"./C2VPtz_i.js";import"./BPabmR7u.js";import"./BpqIGv7T.js";const ye={key:0,class:"text-gray-500"},ke={key:0,class:"capitalize"},Ce=C({__name:"Variant",setup(d){const{product:n}=re();return(c,o)=>{var s,m,_,u,r,b,v,p,y,x,L,$,g,w;return(m=(s=e(n))==null?void 0:s.color)!=null&&m.label||(u=(_=e(n))==null?void 0:_.size)!=null&&u.label?(l(),h("p",ye,[(b=(r=e(n))==null?void 0:r.color)!=null&&b.label?(l(),h("span",ke,k((p=(v=e(n))==null?void 0:v.color)==null?void 0:p.label),1)):f("",!0),(x=(y=e(n))==null?void 0:y.size)!=null&&x.label?(l(),h("span",{key:1,class:U({"ml-2.5 border-l border-gray-300 pl-2.5":($=(L=e(n))==null?void 0:L.color)==null?void 0:$.label})},k((w=(g=e(n))==null?void 0:g.size)==null?void 0:w.label),3)):f("",!0)])):f("",!0)}}}),xe={key:0,class:"relative flex flex-wrap gap-3 bg-white pb-3 text-sm md:px-0"},Le={class:"flex-1"},$e={class:"flex justify-between"},ge={class:"flex-1"},we={class:"line-clamp-2 text-sm font-bold md:w-1/2"},Pe={class:"flex flex-wrap items-center gap-x-2"},Oe={class:"text-normal leading-26px flex flex-wrap items-center self-start"},Se={class:"mr-2 text-xs text-gray-400"},Ae={class:"my-2 hidden text-xs md:block"},Ue={class:"basis-full text-xs md:hidden"},Ve=C({__name:"Line.client",props:{line:{}},setup(d){const c=_e(d);me(c);const{product:o}=c;return(s,m)=>{const _=ae,u=le,r=V,b=ie,v=Ce,p=ce,y=ue;return e(o)?(l(),h("div",xe,[t(r,{to:e(o).url,class:U(["relative mr-4 block h-20 w-20 flex-shrink-0 md:mr-6 md:h-32 md:w-32",{"hover:underline":!!e(o).url}])},{default:i(()=>[t(_),t(u)]),_:1},8,["to","class"]),a("div",Le,[a("div",$e,[a("div",ge,[a("h3",we,[t(r,{to:e(o).url,class:"hover:underline"},{default:i(()=>[H(k(e(o).name),1)]),_:1},8,["to"])]),a("div",Pe,[t(b),t(v)])]),a("div",Oe,[a("p",Se,k(`${s.line.quantity} X`),1),t(p)])]),a("div",Ae,[t(y,{product:e(o),position:("AvailabilityLabelPosition"in s?s.AvailabilityLabelPosition:e(A)).CartLine},null,8,["product","position"])])]),a("div",Ue,[t(y,{product:e(o),position:("AvailabilityLabelPosition"in s?s.AvailabilityLabelPosition:e(A)).CartLine},null,8,["product","position"])])])):f("",!0)}}}),Be=C({inheritAttrs:!1,__name:"Total.client",setup(d){const{loaded:n}=O();return(c,o)=>{const s=pe;return e(n)?(l(),P(s,{key:0,"list-class":"mt-2.5","item-class":"space-y-0.5 py-1","dividing-line":!1})):f("",!0)}}}),Ne={class:"space-y-2.5 md:space-y-4"},ze={key:0,class:"border-b pb-2.5 md:pb-4"},Te=C({__name:"Payment",setup(d){const{paymentMethod:n}=J();return(c,o)=>{const s=K,m=V,_=he,u=de;return l(),P(u,{title:c.$t("checkout.steps.payment"),"content-wrapper-class":"min-h-[15vh]"},{link:i(()=>[t(m,{class:"text-primary-500 inline-flex items-center gap-1 text-sm hover:underline",to:c.$url.checkoutStep(e(Q).Payment)},{default:i(()=>[t(s,{name:"i-heroicons-pencil"}),a("span",null,k(c.$t("checkout.overview.changePaymentMethod")),1)]),_:1},8,["to"])]),default:i(()=>[a("div",Ne,[e(n)?(l(),h("div",ze,k(e(n).label),1)):f("",!0),t(_)])]),_:1},8,["title"])}}}),je=()=>{const{createOrder:d}=O(),n=R();return{errors:n,submit:async()=>{const o=await d();if(!o.success)return n.value=o.errors,!1;o.redirectUrl&&(window.location.href=o.redirectUrl)}}},Fe=B(Ve),De=B(Be),Ee={class:"min-h-[30vh]"},Ye=C({__name:"overview",setup(d){const{cartLines:n,invalidCartLines:c,pending:o,loaded:s}=O(),{previousStep:m}=Y(),{errors:_,submit:u}=je(),r=Z(()=>o.value||!s.value),{isLoading:b,execute:v}=ee(u,!1,{immediate:!1});return(p,y)=>{const x=X,L=Fe,$=De,g=ne,w=te,N=W,z=G,T=q,j=fe,F=be,D=ve,E=Te,I=M;return l(),P(I,null,{sider:i(()=>[e(c).length||e(_)?(l(),P(j,{key:0,errors:e(_)},null,8,["errors"])):f("",!0),t(F,{loading:e(r)},null,8,["loading"]),t(D,{loading:e(r)},null,8,["loading"]),t(E,{loading:e(r)},null,8,["loading"])]),default:i(()=>[t(T,null,{title:i(()=>[t(x,{title:p.$t("checkout.overview")},null,8,["title"])]),default:i(()=>[a("div",Ee,[t(w,null,{default:i(()=>[t(g,{show:e(r),class:"min-h-[inherit]"},{default:i(()=>[a("ul",null,[(l(!0),h(oe,null,se(e(n),S=>(l(),h("li",{key:S.id,class:"mb-3 border-b md:mb-4"},[t(L,{line:S},null,8,["line"])]))),128))]),t($,{"list-class":"mt-2.5","item-class":"space-y-0.5 py-1","dividing-line":!1})]),_:1},8,["show"])]),_:1})])]),"prev-button":i(()=>[t(N,{to:e(m)&&p.$url.checkoutStep(e(m))},null,8,["to"])]),"next-button":i(()=>[t(z,{label:p.$t("checkout.submitOrder"),loading:e(b),onClick:e(v)},null,8,["label","loading","onClick"])]),_:1})]),_:1})}}});
1export{Ye as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.