1import{bd as ne,br as ae,be as r,bM as p,b4 as t,bs as U,bf as n,bh as e,bi as m,bx as x,by as re,bj as s,bz as A,bA as B,ch as he,b8 as pe,bk as M,bm as O,bC as ge,bg as S,bB as L,bS as ye,bO as me,bn as le,bJ as te,cY as _e,bV as be,c6 as ve,bt as ke,bu as we,bv as $e,bw as De,bL as je,bI as Te}from"./BpbuYXql.js";import{g as Ie,a as Ce}from"./DP53TxIk.js";import{u as Se,_ as Re}from"./CLa0u5Wv.js";import{_ as Pe}from"./DNjFuYo4.js";import"./C0ErFREx.js";(function(){try{var k=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};k.SENTRY_RELEASE={id:"756cdc023604ed6e3df7a0d3040281737816c56e"}}catch{}})();try{(function(){var k=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},c=new k.Error().stack;c&&(k._sentryDebugIds=k._sentryDebugIds||{},k._sentryDebugIds[c]="18eab204-ac0a-4db3-acf6-b08799a53535",k._sentryDebugIdIdentifier="sentry-dbid-18eab204-ac0a-4db3-acf6-b08799a53535")})()}catch{}const Ue={key:0,class:"bg-white rounded-xl border border-gray-200 p-6"},Me={class:"font-semibold text-gray-900 mb-4 flex items-center gap-2"},Ee={class:"space-y-3"},Fe={key:0,class:"space-y-2"},Oe={class:"flex items-center gap-3"},ze={class:"w-8 h-8 bg-green-100 rounded-full flex items-center justify-center"},Le={class:"flex items-center gap-2"},Ne={class:"font-mono text-sm font-semibold text-green-700 bg-green-100 px-2 py-0.5 rounded"},Ae={class:"text-xs text-green-600 mt-0.5"},Be={class:"text-right"},qe={class:"text-sm font-semibold text-green-700"},Ve={class:"text-xs text-green-600"},Ke={key:1,class:"flex items-center gap-2 p-3 bg-blue-50 border border-blue-100 rounded-lg"},He={class:"text-sm font-medium text-blue-700"},Ge={key:2,class:"flex items-center justify-between pt-3 border-t border-gray-200"},Qe={class:"text-sm font-medium text-gray-700"},Ye={class:"text-lg font-bold text-green-600"},Je=ne({__name:"OrderDiscounts",props:{discountInfo:{},totalDiscount:{}},setup(k){const c=k,{t:f,locale:z}=ae(),v={pt:"pt-PT",en:"en-GB",es:"es-ES",fr:"fr-FR"},u=g=>new Intl.NumberFormat(v[z.value]||"pt-PT",{style:"currency",currency:"EUR"}).format(g),a=U(()=>c.discountInfo?.discounts&&c.discountInfo.discounts.length>0),j=U(()=>c.discountInfo?.has_free_shipping||!1),b=g=>({percentage:"i-lucide-percent",fixed:"i-lucide-tag"})[g]||"i-lucide-tag",R=g=>g.type==="percentage"?f("account.orders.detail.discounts.percentage",{value:Number.parseFloat(g.value)}):f("account.orders.detail.discounts.fixed",{value:u(g.amount)});return(g,E)=>{const P=re;return t(a)||t(j)||k.totalDiscount>0?(n(),r("div",Ue,[e("h3",Me,[m(P,{name:"i-lucide-tag",class:"w-5 h-5"}),x(" "+s(t(f)("account.orders.detail.discounts.title")),1)]),e("div",Ee,[t(a)?(n(),r("div",Fe,[(n(!0),r(A,null,B(k.discountInfo.discounts,h=>(n(),r("div",{key:h.code,class:"flex items-center justify-between p-3 bg-green-50 border border-green-100 rounded-lg"},[e("div",Oe,[e("div",ze,[m(P,{name:b(h.type),class:"w-4 h-4 text-green-600"},null,8,["name"])]),e("div",null,[e("div",Le,[e("span",Ne,s(h.code),1)]),e("p",Ae,s(h.description),1)])]),e("div",Be,[e("span",qe," -"+s(u(h.amount)),1),e("p",Ve,s(R(h)),1)])]))),128))])):p("",!0),t(j)?(n(),r("div",Ke,[m(P,{name:"i-lucide-truck",class:"w-5 h-5 text-blue-600"}),e("span",He,s(t(f)("account.orders.detail.discounts.freeShipping")),1)])):p("",!0),k.totalDiscount>0?(n(),r("div",Ge,[e("span",Qe,s(t(f)("account.orders.detail.discounts.saved")),1),e("span",Ye,s(u(k.totalDiscount)),1)])):p("",!0)])])):p("",!0)}}}),We=Object.assign(Je,{__name:"AccountOrderDiscounts"}),Xe={class:"bg-white rounded-xl border border-gray-200 p-6"},Ze={class:"flex items-center justify-between mb-4"},et={class:"font-semibold text-gray-900"},tt={key:0,class:"mb-4 p-3 bg-gray-50 rounded-lg space-y-2"},st={class:"flex items-center justify-between"},ot={class:"text-sm text-gray-600"},nt={key:0,class:"flex items-center justify-between"},at={class:"text-sm text-gray-600"},rt={class:"font-mono text-sm font-medium"},ct={key:1,class:"flex items-center justify-between"},lt={class:"text-sm text-gray-600"},it={class:"text-sm font-medium"},dt={key:2,class:"pt-2 border-t border-gray-200 mt-2"},ut=["href"],_t={key:1,class:"text-center py-6"},mt={class:"text-sm text-gray-500"},pt={class:"text-xs text-gray-400 mt-1"},gt={key:2,class:"space-y-0"},ft={class:"flex flex-col items-center"},yt={key:0,class:"w-0.5 flex-1 min-h-[24px] bg-gray-200"},ht={class:"flex-1 pb-4"},xt={class:"flex items-start justify-between gap-2"},bt={class:"text-sm font-medium text-gray-900"},vt={key:0,class:"text-xs text-gray-500 mt-0.5"},kt={key:1,class:"text-xs text-gray-500 mt-0.5 italic"},wt=ne({__name:"OrderTrackingHistory",props:{orderUuid:{},shipments:{}}
1,emits:["statusUpdated"],setup(k,{emit:c}){const f=k,z=c,{t:v,locale:u}=ae(),a=he(),j=M([]),b=M(null),R=M(!1),g=M(!1);pe(()=>{if(f.shipments.length>0){const i=f.shipments.find(D=>D.tracking_code&&D.tracking_history?.length>0)||f.shipments.find(D=>D.tracking_history?.length>0)||f.shipments[0];i&&(b.value={tracking_code:i.tracking_code||"",courier:i.courier,status:i.status,tracking_url:i.tracking_url},i.tracking_history&&i.tracking_history.length>0&&(j.value=i.tracking_history,g.value=!0))}});const E={pt:"pt-PT",en:"en-GB",es:"es-ES",fr:"fr-FR"},P=i=>{try{return new Date(i).toLocaleDateString(E[u.value]||"pt-PT",{day:"numeric",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return i}},h=i=>"datetime"in i?i.datetime:"",N=i=>i.description,$=i=>i.url||null,I=async()=>{R.value=!0;try{const i=await $fetch(`/api/orders/${f.orderUuid}/refresh-tracking`,{method:"POST"});if(i.success&&i.shipments.length>0){const D=i.shipments[0];D&&(j.value=D.tracking_history||[],b.value={tracking_code:D.tracking_code,courier:D.courier,status:D.status},i.order_status&&z("statusUpdated",i.order_status)),g.value=!0,a.add({title:v("account.orders.detail.tracking.updated"),color:"success",icon:"i-lucide-check-circle"})}else a.add({title:i.message||v("account.orders.detail.tracking.noActiveShipments"),color:"warning",icon:"i-lucide-info"})}catch(i){console.error("[Tracking] Error refreshing:",i),a.add({title:v("account.orders.detail.tracking.error"),color:"error",icon:"i-lucide-alert-circle"})}finally{R.value=!1}},T=i=>({POD:"i-lucide-package-check",OFD:"i-lucide-truck",COL:"i-lucide-package",PEC:"i-lucide-warehouse",700:"i-lucide-bell",706:"i-lucide-clock"})[i]||"i-lucide-circle",F=i=>("code"in i?i.code:"")==="POD"&&!!$(i),q=i=>"code"in i?i.code:"",Q=i=>{window.open(i,"_blank")},W=i=>v({"wait-shipment":"account.orders.detail.shipment.statuses.waitShipment",shipped:"account.orders.detail.shipment.statuses.shipped","in-transit":"account.orders.detail.shipment.statuses.inTransit","out-for-delivery":"account.orders.detail.shipment.statuses.outForDelivery",delivered:"account.orders.detail.shipment.statuses.delivered",returned:"account.orders.detail.shipment.statuses.returned"}[i]||i),X=i=>({"wait-shipment":"bg-yellow-100 text-yellow-700",shipped:"bg-blue-100 text-blue-700","in-transit":"bg-purple-100 text-purple-700","out-for-delivery":"bg-indigo-100 text-indigo-700",delivered:"bg-green-100 text-green-700",returned:"bg-red-100 text-red-700"})[i]||"bg-gray-100 text-gray-700";return(i,D)=>{const K=ge,Y=re;return n(),r("div",Xe,[e("div",Ze,[e("h3",et,s(t(v)("account.orders.detail.tracking.title")),1),m(K,{variant:"outline",color:"neutral",size:"sm",icon:"i-lucide-refresh-cw",loading:t(R),onClick:I},{default:O(()=>[x(s(t(R)?t(v)("account.orders.detail.tracking.refreshing"):t(v)("account.orders.detail.tracking.refresh")),1)]),_:1},8,["loading"])]),t(b)?(n(),r("div",tt,[e("div",st,[e("span",ot,s(t(v)("account.orders.detail.shipment.status")),1),e("span",{class:S(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",X(t(b).status)])},s(W(t(b).status)),3)]),t(b).tracking_code?(n(),r("div",nt,[e("span",at,s(t(v)("account.orders.detail.shipment.trackingCode")),1),e("span",rt,s(t(b).tracking_code),1)])):p("",!0),t(b).courier?(n(),r("div",ct,[e("span",lt,s(t(v)("account.orders.detail.shipment.courier")),1),e("span",it,s(t(b).courier),1)])):p("",!0),t(b).tracking_url?(n(),r("div",dt,[e("a",{href:t(b).tracking_url,target:"_blank",rel:"noopener noreferrer",class:"inline-flex items-center gap-1.5 text-sm text-blue-600 hover:text-blue-700 font-medium"},[m(Y,{name:"i-lucide-external-link",class:"w-4 h-4"}),x(" "+s(t(v)("account.orders.detail.shipment.trackPackage")),1)],8,ut)])):p("",!0)])):p("",!0),!t(g)&&t(j).length===0?(n(),r("div",_t,[m(Y,{name:"i-lucide-package-search",class:"w-10 h-10 text-gray-300 mx-auto mb-2"}),e("p",mt,s(t(v)("account.orders.detail.tracking.noHistory")),1),e("p",pt,s(t(v)("account.orders.detail.tracking.refresh")),1)])):t(j).length>0?(n(),r("div",gt,[(n(!0),r(A,null,B(t(j),(C,l)=>(n(),r("div",{key:l,class:"relative flex gap-3"},[e("div",ft,[e("div",{class:S(["w-8 h-8 rounded-full flex items-center justify-center shrink-0",l===0?"bg-green-500 text-white":"bg-gray-200 text-gray-500"])},[m(Y,{name:T(q(C)),class:"w-4 h-4"},null,8,["name"])],2),l<t(j).length-1?(n(),r("div",yt)):p("",!0)]),e("div",ht,[e("div",xt,[e("div",null,[e("p",bt,s(N(C)),1),h(C)?(n(),r("p",vt,s(P(h(C))),1)):p("",!0),"comment"in C&&C.comment?(n(),r("p",kt,s(C.comment),1)):p("",!0)]),F(C)?(n(),L(K,{key:0,variant:"soft",color:"success",size:"xs",icon:"i-lucide-image",onClick:d=>Q($(C))},{default:O(()=>[x(s(t(v)("account.orders.detail.tracking.viewProof")),1)]),_:1},8,["onClick"])):p("",!0)])])]))),128))])):p("",!0)])}}}),$t=Object.assign(wt,{__name:"AccountOrderTrackingHistory"}),Dt={class:"bg-white rounded-xl border border-gray-200 p-6"},jt={class:"font-semibold text-gray-900 mb-4 flex items-center gap-2"},Tt={class:"space-y-4"},It={class:"flex items-center justify-between mb-3"},Ct={class:"flex items-center gap-2"},St=["src","alt"],Rt={class:"font-medium"},Pt={class:"space-y-2 text-sm"},Ut={class:"flex justify-between"},Mt={class:"text-gray-500"},Et={class:"font-semibold text-gray-900"},Ft={key:0,class:"flex justify-between"},Ot={class:"text-gray-500"},zt={class:"font-mono text-gray-700"},Lt={class:"flex justify-between"},Nt={class:"text-gray-500"},At={class:"text-gray-700"},Bt=ne({__name:"OrderPaymentInfo",props:{payments:{}}
1,setup(k){const{t:c,locale:f}=ae(),z={pt:"pt-PT",en:"en-GB",es:"es-ES",fr:"fr-FR"},v=g=>{const E=typeof g=="string"?Number.parseFloat(g):g;return new Intl.NumberFormat(z[f.value]||"pt-PT",{style:"currency",currency:"EUR"}).format(E)},u=g=>{try{return new Date(g).toLocaleDateString(z[f.value]||"pt-PT",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return g}},a=g=>`account.orders.detail.payment.methods.${g.toLowerCase().replace(/-/g,"_")}`,j=g=>`account.orders.detail.payment.statuses.${g}`,b=g=>({mb_way:"/payment/mbway.png",mbway:"/payment/mbway.png",klarna:"/payment/klarna.svg",card:"/payment/visa.svg",multibanco:"/payment/multibanco.png",paypal:"/payment/paypal.svg",apple_pay:"/payment/apple-pay.png",google_pay:"/payment/google-pay.png"})[g.toLowerCase()]||null,R=g=>({wallet_credits:"i-lucide-wallet",google_pay:"i-lucide-smartphone"})[g.toLowerCase()]||"i-lucide-credit-card";return(g,E)=>{const P=re;return n(),r("div",Dt,[e("h3",jt,[m(P,{name:"i-lucide-credit-card",class:"w-5 h-5"}),x(" "+s(t(c)("account.orders.detail.payment.title")),1)]),e("div",Tt,[(n(!0),r(A,null,B(k.payments,h=>(n(),r("div",{key:h.id,class:"border border-gray-100 rounded-lg p-4"},[e("div",It,[e("div",Ct,[b(h.payment_method)?(n(),r("img",{key:0,src:b(h.payment_method),alt:t(c)(a(h.payment_method)),class:"w-8 h-6 object-contain"},null,8,St)):(n(),L(P,{key:1,name:R(h.payment_method),class:"w-5 h-5 text-gray-600"},null,8,["name"])),e("span",Rt,s(t(c)(a(h.payment_method))),1)]),e("span",{class:S(["inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium",t(Ie)(h.status)])},s(t(c)(j(h.status))),3)]),e("div",Pt,[e("div",Ut,[e("span",Mt,s(t(c)("account.orders.detail.payment.amount")),1),e("span",Et,s(v(h.amount)),1)]),h.transaction_id?(n(),r("div",Ft,[e("span",Ot,s(t(c)("account.orders.detail.payment.transactionId")),1),e("span",zt,"#"+s(h.transaction_id),1)])):p("",!0),e("div",Lt,[e("span",Nt,s(t(c)("account.orders.detail.payment.date")),1),e("span",At,s(u(h.created_at)),1)])])]))),128))])])}}}),qt=Object.assign(Bt,{__name:"AccountOrderPaymentInfo"}),Vt={class:"p-6"},Kt={class:"flex items-center justify-between mb-6"},Ht={class:"text-xl font-bold text-gray-900"},Gt={class:"text-sm text-gray-500 mt-1"},Qt={class:"flex items-center justify-between mb-8"},Yt={key:1},Jt={key:0,class:"space-y-4"},Wt={class:"font-semibold text-gray-900"},Xt={class:"flex items-center gap-3 p-3 bg-gray-50 rounded-lg cursor-pointer"},Zt=["checked"],es={class:"text-sm font-medium"},ts={class:"space-y-2 max-h-64 overflow-y-auto"},ss=["checked","onChange"],os=["src","alt"],ns={class:"flex-1 min-w-0"},as={class:"text-sm font-medium text-gray-900 truncate"},rs={key:0,class:"text-xs text-gray-500"},cs={class:"text-xs text-gray-500"},ls={class:"text-sm font-semibold"},is={key:0,class:"flex items-center justify-between pt-4 border-t border-gray-200"},ds={class:"text-sm text-gray-600"},us={class:"text-right"},_s={class:"text-sm text-gray-600"},ms={class:"text-lg font-bold"},ps={key:1,class:"space-y-4"},gs={class:"font-semibold text-gray-900"},fs={class:"space-y-3"},ys={class:"flex-1"},hs={class:"flex items-center gap-2"},xs={class:"font-medium"},bs={class:"text-sm text-gray-500 mt-1"},vs={class:"flex-1"},ks={class:"flex items-center gap-2"},ws={class:"font-medium"},$s={class:"text-sm text-gray-500 mt-1"},Ds={key:2,class:"space-y-4"},js={class:"font-semibold text-gray-900"},Ts={key:0,class:"py-8 text-center"},Is={key:1,class:"space-y-2"},Cs=["value"],Ss={class:"font-medium"},Rs={class:"text-sm text-gray-500 mt-0.5"},Ps={class:"pt-4"},Us={class:"block text-sm font-medium text-gray-700 mb-2"},Ms=["placeholder"],Es={key:3,class:"space-y-4"},Fs={class:"font-semibold text-gray-900"},Os={class:"bg-gray-50 rounded-lg p-4 space-y-3"},zs={class:"flex justify-between text-sm"},Ls={class:"text-gray-600"},Ns={class:"font-medium"},As={class:"flex justify-between text-sm"},Bs={class:"text-gray-600"},qs={class:"font-medium"},Vs={class:"flex justify-between text-sm"},Ks={class:"text-gray-600"},Hs={class:"font-medium"},Gs={class:"text-sm font-medium text-gray-700 mb-2"},Qs={class:"space-y-2"},Ys=["src","alt"],Js={class:"flex-1 min-w-0"},Ws={class:"text-sm font-medium truncate"},Xs={class:"text-xs text-gray-500"},Zs={class:"text-sm font-medium"},eo={class:"flex justify-between pt-4 border-t border-gray-200"},to={class:"font-semibold"},so={class:"text-xl font-bold"},oo={class:"grid grid-cols-1 sm:grid-cols-2 gap-3 mt-8 pt-4 border-t border-gray-200"},oe=4,no=ne({__name:"RefundRequestModal",props:{order:{},open:{type:Boolean}},emits:["update:open","success"],setup(k,{emit:c}){const f=k,z=c,v=()=>{z("update:open",!1)},{t:u,locale:a}=ae(),j=he(),{loadingCategories:b,fetchCategories:R,createTicket:g,getRefundReasons:E,getLocalizedName:P,getLocalizedDescription:h,buildRefundTicketRequest:N}=Se(),$=M(1),I=M(new Set),T=M(null),F=M(null),q=M(""),Q=M([]),W=()=>{$.value=1,I.value=new Set,T.value=null,F.value=null,q.value="",Q.value=[]};ye(()=>f.open,o=>{o||W()});const X={pt:"pt-PT",en:"en-GB",es:"es-ES",fr:"fr-FR"},i=o=>new Intl.NumberFormat(X[a.value]||"pt-PT",{style:"currency",currency:"EUR"}
1).format(o),D=o=>{try{return new Date(o).toLocaleDateString(X[a.value]||"pt-PT",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return o}},K=o=>`${o.variant_uuid}-${o.offer_uuid}`,Y=o=>{const y=K(o);I.value.has(y)?I.value.delete(y):I.value.add(y)},C=()=>{I.value.size===f.order.items.length?I.value.clear():f.order.items.forEach(o=>{I.value.add(K(o))})},l=o=>I.value.has(K(o)),d=U(()=>I.value.size===f.order.items.length),w=U(()=>f.order.items.filter(o=>l(o))),H=U(()=>w.value.reduce((o,y)=>o+y.total,0)),V=U(()=>F.value?Q.value.find(o=>o.id===F.value):null),J=U(()=>T.value?T.value==="refund"?u("account.orders.detail.refund.types.paymentMethod"):u("account.orders.detail.refund.types.accountCredits"):"");pe(async()=>{await R()}),ye(T,o=>{o&&(Q.value=E(o),F.value=null)});const se=U(()=>{switch($.value){case 1:return I.value.size>0;case 2:return T.value!==null;case 3:return F.value!==null;case 4:return!0;default:return!1}}),ie=()=>{se.value&&$.value<oe&&$.value++},de=()=>{$.value>1&&$.value--},Z=M(!1),ue=async()=>{if(!(!T.value||!F.value)){Z.value=!0;try{const o=w.value.map(G=>({name:G.name,variantReference:G.variant_reference,offerUuid:G.offer_uuid,quantity:G.quantity,total:G.total})),y=N({orderId:f.order.id,orderNumber:f.order.id,orderDate:D(f.order.created_at),orderTotal:f.order.total,refundType:T.value,reasonId:F.value,items:o,additionalNotes:q.value||void 0,formatCurrency:i});await g(y)!==null?(j.add({title:u("account.orders.detail.refund.success.title"),description:u("account.orders.detail.refund.success.description"),color:"success",icon:"i-lucide-check-circle"}),z("success"),v()):j.add({title:u("account.orders.detail.refund.error.title"),color:"error",icon:"i-lucide-alert-circle"})}catch(o){console.error("[RefundModal] Error submitting:",o),j.add({title:u("account.orders.detail.refund.error.title"),color:"error",icon:"i-lucide-alert-circle"})}finally{Z.value=!1}}},ce=o=>{const y=[];return o["apparel-size"]&&y.push(`Tam: ${o["apparel-size"]}`),o["shoes-size"]&&y.push(`Tam: ${o["shoes-size"]}`),o.capacity&&y.push(`${o.capacity}ml`),y.join(" | ")};return(o,y)=>{const ee=re,G=ge,xe=ve;return n(),L(xe,{open:f.open,"onUpdate:open":y[4]||(y[4]=_=>z("update:open",_))},{content:O(()=>[e("div",Vt,[e("div",Kt,[e("div",null,[e("h2",Ht,s(t(u)("account.orders.detail.refund.title")),1),e("p",Gt,s(t(u)("account.orders.detail.refund.subtitle")),1)]),e("button",{type:"button",class:"p-2 hover:bg-gray-100 rounded-lg transition-colors",onClick:v},[m(ee,{name:"i-lucide-x",class:"w-5 h-5"})])]),e("div",Qt,[(n(),r(A,null,B(oe,_=>e("div",{key:_,class:S(["flex items-center",{"flex-1":_<oe}])},[e("div",{class:S(["w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium transition-colors",[_<t($)?"bg-green-500 text-white":_===t($)?"bg-black text-white":"bg-gray-200 text-gray-500"]])},[_<t($)?(n(),L(ee,{key:0,name:"i-lucide-check",class:"w-4 h-4"})):(n(),r("span",Yt,s(_),1))],2),_<oe?(n(),r("div",{key:0,class:S(["flex-1 h-0.5 mx-2",_<t($)?"bg-green-500":"bg-gray-200"])},null,2)):p("",!0)],2)),64))]),t($)===1?(n(),r("div",Jt,[e("h3",Wt,s(t(u)("account.orders.detail.refund.selectItems.title")),1),e("label",Xt,[e("input",{type:"checkbox",checked:t(d),class:"w-4 h-4 rounded border-gray-300",onChange:C},null,40,Zt),e("span",es,s(t(u)("account.orders.detail.refund.selectItems.selectAll")),1)]),e("div",ts,[(n(!0),r(A,null,B(k.order.items,_=>(n(),r("label",{key:K(_),class:S(["flex items-center gap-3 p-3 border border-gray-200 rounded-lg cursor-pointer hover:bg-gray-50 transition-colors",{"border-black bg-gray-50":l(_)}])},[e("input",{type:"checkbox",checked:l(_),class:"w-4 h-4 rounded border-gray-300",onChange:fe=>Y(_)},null,40,ss),e("img",{src:t(me)(_.image,"thumb"),alt:_.name,class:"w-12 h-12 object-cover rounded"},null,8,os),e("div",ns,[e("p",as,s(_.name),1),ce(_.attributes)?(n(),r("p",rs,s(ce(_.attributes)),1)):p("",!0),e("p",cs,"Qtd: "+s(_.quantity),1)]),e("span",ls,s(i(_.total)),1)],2))),128))]),t(I).size>0?(n(),r("div",is,[e("span",ds,s(t(u)("account.orders.detail.refund.selectItems.selected",{count:t(I).size},t(I).size)),1),e("div",us,[e("span",_s,s(t(u)("account.orders.detail.refund.selectItems.totalRefund")),1),e("p",ms,s(i(t(H))),1)])])):p("",!0)])):t($)===2?(n(),r("div",ps,[e("h3",gs,s(t(u)("account.orders.detail.refund.types.title")),1),e("div",fs,[e("label",{class:S(["flex items-start gap-4 p-4 border rounded-lg cursor-pointer transition-colors",t(T)==="refund"?"border-black bg-gray-50":"border-gray-200 hover:bg-gray-50"])},[le(e("input",{"onUpdate:modelValue":y[0]||(y[0]=_=>te(T)?T.value=_:null),type:"radio",value:"refund",class:"mt-1"}
1,null,512),[[_e,t(T)]]),e("div",ys,[e("div",hs,[m(ee,{name:"i-lucide-credit-card",class:"w-5 h-5 text-gray-600"}),e("span",xs,s(t(u)("account.orders.detail.refund.types.paymentMethod")),1)]),e("p",bs,s(t(u)("account.orders.detail.refund.types.paymentMethodDesc")),1)])],2),e("label",{class:S(["flex items-start gap-4 p-4 border rounded-lg cursor-pointer transition-colors",t(T)==="credits"?"border-black bg-gray-50":"border-gray-200 hover:bg-gray-50"])},[le(e("input",{"onUpdate:modelValue":y[1]||(y[1]=_=>te(T)?T.value=_:null),type:"radio",value:"credits",class:"mt-1"},null,512),[[_e,t(T)]]),e("div",vs,[e("div",ks,[m(ee,{name:"i-lucide-wallet",class:"w-5 h-5 text-gray-600"}),e("span",ws,s(t(u)("account.orders.detail.refund.types.accountCredits")),1)]),e("p",$s,s(t(u)("account.orders.detail.refund.types.accountCreditsDesc")),1)])],2)])])):t($)===3?(n(),r("div",Ds,[e("h3",js,s(t(u)("account.orders.detail.refund.reason.title")),1),t(b)?(n(),r("div",Ts,[m(ee,{name:"i-lucide-loader-2",class:"w-6 h-6 animate-spin mx-auto text-gray-400"})])):(n(),r("div",Is,[(n(!0),r(A,null,B(t(Q),_=>(n(),r("label",{key:_.id,class:S(["flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition-colors",t(F)===_.id?"border-black bg-gray-50":"border-gray-200 hover:bg-gray-50"])},[le(e("input",{"onUpdate:modelValue":y[2]||(y[2]=fe=>te(F)?F.value=fe:null),type:"radio",value:_.id,class:"mt-0.5"},null,8,Cs),[[_e,t(F)]]),e("div",null,[e("span",Ss,s(t(P)(_)),1),e("p",Rs,s(t(h)(_)),1)])],2))),128))])),e("div",Ps,[e("label",Us,s(t(u)("account.orders.detail.refund.notes.title")),1),le(e("textarea",{"onUpdate:modelValue":y[3]||(y[3]=_=>te(q)?q.value=_:null),placeholder:t(u)("account.orders.detail.refund.notes.placeholder"),rows:"3",class:"w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-black focus:border-black"},null,8,Ms),[[be,t(q)]])])])):t($)===4?(n(),r("div",Es,[e("h3",Fs,s(t(u)("account.orders.detail.refund.confirm.title")),1),e("div",Os,[e("div",zs,[e("span",Ls,s(t(u)("account.orders.detail.refund.confirm.orderNumber")),1),e("span",Ns,"#"+s(k.order.id),1)]),e("div",As,[e("span",Bs,s(t(u)("account.orders.detail.refund.confirm.refundType")),1),e("span",qs,s(t(J)),1)]),e("div",Vs,[e("span",Ks,s(t(u)("account.orders.detail.refund.confirm.refundReason")),1),e("span",Hs,s(t(V)?t(P)(t(V)):""),1)])]),e("div",null,[e("h4",Gs,s(t(u)("account.orders.detail.refund.confirm.itemsToRefund")),1),e("div",Qs,[(n(!0),r(A,null,B(t(w),_=>(n(),r("div",{key:K(_),class:"flex items-center gap-3 p-2 bg-gray-50 rounded"},[e("img",{src:t(me)(_.image,"thumb"),alt:_.name,class:"w-10 h-10 object-cover rounded"},null,8,Ys),e("div",Js,[e("p",Ws,s(_.name),1),e("p",Xs,"Qtd: "+s(_.quantity),1)]),e("span",Zs,s(i(_.total)),1)]))),128))])]),e("div",eo,[e("span",to,s(t(u)("account.orders.detail.refund.confirm.totalAmount")),1),e("span",so,s(i(t(H))),1)])])):p("",!0),e("div",oo,[t($)>1?(n(),L(G,{key:0,variant:"ghost",color:"neutral",class:"w-full sm:w-auto justify-start sm:justify-center text-left sm:text-center",onClick:de},{default:O(()=>[x(s(t(u)("account.orders.detail.refund.back")),1)]),_:1})):(n(),L(G,{key:1,variant:"ghost",color:"neutral",class:"w-full sm:w-auto justify-start sm:justify-center text-left sm:text-center",onClick:v},{default:O(()=>[x(s(t(u)("account.orders.detail.refund.cancel")),1)]),_:1})),t($)<oe?(n(),L(G,{key:2,disabled:!t(se),color:"neutral",class:"w-full sm:w-auto justify-start sm:justify-center text-left sm:text-center sm:justify-self-end",onClick:ie},{default:O(()=>[x(s(t(u)("account.orders.detail.refund.next")),1)]),_:1},8,["disabled"])):(n(),L(G,{key:3,loading:t(Z),disabled:!t(se),color:"neutral",class:"w-full sm:w-auto justify-start sm:justify-center text-left sm:text-center sm:justify-self-end",onClick:ue},{default:O(()=>[x(s(t(Z)?t(u)("account.orders.detail.refund.submitting"):t(u)("account.orders.detail.refund.submit")),1)]),_:1},8,["loading","disabled"]))])])]),_:1},8,["open"])}}}),ao=Object.assign(no,{__name:"AccountRefundRequestModal"}),ro={class:"min-h-screen bg-gray-50"},co={key:0,class:"bg-white rounded-xl border border-gray-200 p-8"},lo={class:"animate-pulse space-y-6"},io={class:"flex justify-between items-start"},uo={class:"space-y-2"},_o={class:"grid grid-cols-7 gap-4"},mo={class:"grid lg:grid-cols-2 gap-6"},po={key:1,class:"bg-white rounded-xl border border-gray-200 p-8 text-center"},go={class:"w-20 h-20 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-6"},fo={class:"text-xl font-semibold text-gray-900 mb-2"},yo={class:"text-gray-600 mb-6"},ho={key:2,class:"bg-white rounded-xl border border-gray-200 p-8 text-center"},xo={class:"w-20 h-20 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-6"},bo={class:"text-xl font-semibold text-gray-900 mb-2"},vo={class:"text-gray-600 mb-6"},ko={key:3,class:"space-y-6"},wo={class:"bg-white rounded-xl border border-gray-200 p-6"},$o={class:"flex flex-col sm:flex-row sm:items-center justify-between gap-4"},Do={class:"text-2xl font-bold text-gray-900 mb-1"},jo={class:"text-gray-600"},To={key:0,class:"mt-1 flex items-center gap-2"},Io={key:0,class:"text-xs font-medium text-orange-600 bg-orange-50 px-2 py-0.5 rounded-full"},Co={class:"bg-white rounded-xl border border-gray-200 p-6"},So={class:"text-lg font-semibold text-gray-900 mb-6"},Ro={class:"hidden md:block"},Po={class:"relative"},Uo={class:"relative flex justify-between"},Mo={key:0,class:"text-xs text-gray-500 mt-1"},Eo={class:"md:hidden space-y-4"},Fo={class:"flex flex-col items-center"},Oo={class:"pt-1"},zo={key:0,class:"text-xs text-gray-500"},Lo={class:"bg-white rounded-xl border border-gray-200 p-6"},No={class:"text-lg font-semibold text-gray-900 mb-4"},Ao={class:"divide-y divide-gray-100"},Bo={class:"w-20 h-20 bg-gray-100 rounded-lg overflow-hidden shrink-0"},qo=["src","alt"],Vo={class:"flex-1 min-w-0"},Ko={class:"font-medium text-gray-900 truncate"},Ho={key:0,class:"text-sm text-gray-500 mt-0.5"},Go={class:"text-sm text-gray-500 mt-1"},Qo={class:"text-right shrink-0"},Yo={class:"font-semibold text-gray-900"},Jo={key:0,class:"text-sm text-green-600"},Wo={class:"grid lg:grid-cols-2 gap-6"},Xo={class:"space-y-6"},Zo={class:"bg-white rounded-xl border border-gray-200 p-6"},en={class:"font-semibold text-gray-900 mb-3 flex items-center gap-2"},tn={class:"not-italic text-gray-600 text-sm leading-relaxed"},sn={key:0},on={class:"bg-white rounded-xl border border-gray-200 p-6"},nn={class:"font-semibold text-gray-900 mb-3 flex items-center gap-2"},an={class:"not-italic text-gray-600 text-sm leading-relaxed"},rn={key:0},cn={key:1,class:"block mt-2"},ln={class:"space-y-6"},dn={class:"bg-white rounded-xl border border-gray-200 p-6"},un={class:"font-semibold text-gray-900 mb-4 flex items-center gap-2"},_n={class:"space-y-3"},mn={class:"flex justify-between text-sm"},pn={class:"text-gray-600"},gn={class:"font-medium"},fn={key:0,class:"flex justify-between text-sm"},yn={class:"text-green-600"},hn={class:"font-medium text-green-600"},xn={class:"flex justify-between text-sm"},bn={class:"text-gray-600"},vn={key:0,class:"font-medium text-green-600"},kn={key:1,class:"font-medium"},wn={class:"flex justify-between text-sm"},$n={class:"text-gray-600"},Dn={class:"font-medium"},jn={class:"border-t border-gray-200 pt-3 flex justify-between"},Tn={class:"font-semibold text-gray-900"},In={class:"font-bold text-lg text-gray-900"},Cn={key:1,class:"bg-white rounded-xl border border-gray-200 p-6"},Sn={class:"font-semibold text-gray-900 mb-4 flex items-center gap-2"},Rn={class:"divide-y divide-gray-100"},Pn={class:"flex items-center gap-3"},Un={class:"w-10 h-10 bg-gray-50 rounded-lg flex items-center justify-center shrink-0 border border-gray-200"},Mn={class:"text-sm font-medium text-gray-900"},En={class:"text-xs text-gray-500"},Fn={key:2,class:"bg-white rounded-xl border border-gray-200 p-6 space-y-3"},On={class:"flex items-center gap-2 text-sm text-green-700 bg-green-50 rounded-lg px-4 py-3"},zn={class:"bg-white rounded-xl border border-gray-200 p-6"},Ln={class:"font-semibold text-gray-900 mb-4 flex items-center gap-2"},Kn=ne({__name:"[uuid]",setup(k){const{t:c,locale:f}=ae(),z=ke(),v=we(),u=U(()=>v.params.uuid),a=M(null),j=M(!0),b=M(null),R=M(!1),g=M(!1),E=async()=>{j.value=!0,b.value=null;try{const l=await $fetch(`/api/orders/${u.value}`);l.success&&l.data?a.value=l.data:b.value="Order not found"}catch(l){const d=l;d.statusCode===404?b.value="not_found":b.value=d?.data?.message||d?.message||"Failed to load order",console.error("[OrderDetail] Error:",l)}finally{j.value=!1}};pe(()=>{E()});const P={pt:"pt-PT",en:"en-GB",es:"es-ES",fr:"fr-FR"},h=(l,d=!1)=>{try{const w=new Date(l),H={day:"numeric",month:"long",year:"numeric",...d?{hour:"2-digit",minute:"2-digit"}:{}};return w.toLocaleDateString(P[f.value]||"pt-PT",H)}catch{return l}},N=l=>new Intl.NumberFormat(P[f.value]||"pt-PT",{style:"currency",currency:"EUR"}).format(l),$=l=>f.value==="en"?l.label_en:l.label,I=l=>({"mdi-cart-check":"i-lucide-shopping-cart","mdi-credit-card-check":"i-lucide-credit-card","mdi-package-variant":"i-lucide-package","mdi-truck-delivery":"i-lucide-truck","mdi-truck-fast":"i-lucide-truck","mdi-map-marker-radius":"i-lucide-map-pin","mdi-package-variant-closed-check":"i-lucide-package-check"})[l.icon]||"i-lucide-circle",T=U(()=>a.value?Ce(a.value.status):"bg-gray-100 text-gray-700"),F=U(()=>a.value?c({processing:"account.orders.status.processing",shipped:"account.orders.status.shipped",delivered:"account.orders.status.delivered",completed:"account.orders.status.completed",cancelled:"account.orders.status.cancelled","partially-delivered":"account.orders.status.partiallyDelivered"}[a.value.status]||"account.orders.status.processing"):""),q=U(()=>{const l=a.value?.estimated_delivery_info;return l?.is_delayed===!0||l?.status==="delayed"}),Q=U(()=>
1{if(!a.value||["delivered","completed","cancelled"].includes(a.value.status))return null;const l=a.value.estimated_delivery_info;if(!l)return null;if(l.estimated_date)return new Date(l.estimated_date).toLocaleDateString(P[f.value]||"pt-PT",{day:"numeric",month:"short"});if(l.estimated_range?.max_days){const d=new Date(a.value.created_at);return d.setDate(d.getDate()+l.estimated_range.max_days),d.toLocaleDateString(P[f.value]||"pt-PT",{day:"numeric",month:"short"})}return null}),W=U(()=>a.value?a.value.documents.filter(l=>["FRCF","NCCF"].includes(l.document_type)&&l.document_path).map(l=>({...l,typeLabel:l.document_type==="FRCF"?c("account.orders.detail.documents.invoice"):c("account.orders.detail.documents.creditNote")})):[]),X=l=>{window.open(l,"_blank")},i=()=>{R.value=!0},D=()=>{R.value=!1},K=l=>{a.value&&(a.value.status=l)},Y=l=>{const d=[];return l["apparel-size"]&&d.push(`Tam: ${l["apparel-size"]}`),l["shoes-size"]&&d.push(`Tam: ${l["shoes-size"]}`),l.capacity&&d.push(`${l.capacity}ml`),d.join(" | ")},C=U(()=>
1{if(!a.value)return[];const l=a.value.order_timeline,d=l.reduce((w,H,V)=>H.completed?V:w,-1);return l.map((w,H)=>({...w,completed:H<=d||w.completed}))});return $e({title:U(()=>a.value?c("account.orders.detail.title",{id:a.value.id}):c("account.orders.title"))}),(l,d)=>{const w=re,H=De,V=je,J=ge,se=We,ie=$t,de=qt,Z=ao,ue=Re,ce=Pe;return n(),r("div",ro,[m(ce,{class:"py-8 md:py-12"},{default:O(()=>[m(H,{to:t(z)("/account/orders"),class:"inline-flex items-center gap-2 text-gray-600 hover:text-black transition-colors mb-6"},{default:O(()=>[m(w,{name:"i-lucide-arrow-left",class:"w-4 h-4"}),x(" "+s(t(c)("account.orders.detail.backToOrders")),1)]),_:1},8,["to"]),t(j)?(n(),r("div",co,[e("div",lo,[e("div",io,[e("div",uo,[m(V,{class:"h-8 w-48"}),m(V,{class:"h-4 w-32"})]),m(V,{class:"h-8 w-28 rounded-full"})]),e("div",_o,[(n(),r(A,null,B(7,o=>m(V,{key:o,class:"h-16"})),64))]),e("div",mo,[m(V,{class:"h-48"}),m(V,{class:"h-48"})])])])):t(b)==="not_found"?(n(),r("div",po,[e("div",go,[m(w,{name:"i-lucide-package-x",class:"w-10 h-10 text-gray-400"})]),e("h2",fo,s(t(c)("account.orders.detail.notFound.title")),1),e("p",yo,s(t(c)("account.orders.detail.notFound.description")),1),m(J,{to:t(z)("/account/orders"),variant:"solid",color:"neutral"},{default:O(()=>[x(s(t(c)("account.orders.detail.notFound.backButton")),1)]),_:1},8,["to"])])):t(b)?(n(),r("div",ho,[e("div",xo,[m(w,{name:"i-lucide-alert-circle",class:"w-10 h-10 text-red-500"})]),e("h2",bo,s(t(c)("campaigns.errorTitle")),1),e("p",vo,s(t(b)),1),m(J,{variant:"solid",color:"neutral",onClick:E},{default:O(()=>[x(s(t(c)("common.tryAgain")),1)]),_:1})])):t(a)?(n(),r("div",ko,[e("div",wo,[e("div",$o,[e("div",null,[e("h1",Do,s(t(c)("account.orders.detail.title",{id:t(a).id})),1),e("p",jo,s(t(c)("account.orders.detail.orderPlaced"))+" "+s(h(t(a).created_at)),1),t(Q)?(n(),r("div",To,[e("p",{class:S(t(q)?"text-orange-600":"text-gray-600")},s(t(q)?t(c)("account.orders.delayedDelivery"):t(c)("account.orders.estimatedDelivery"))+": "+s(t(c)("cart.page.estimatedDelivery",{date:t(Q)})),3),t(q)?(n(),r("span",Io,s(t(c)("account.orders.delayed")),1)):p("",!0)])):p("",!0)]),e("span",{class:S(["inline-flex items-center px-4 py-2 rounded-full text-sm font-medium w-fit",t(T)])},s(t(F)),3)])]),e("div",Co,[e("h2",So,s(t(c)("account.orders.detail.timeline.title")),1),e("div",Ro,[e("div",Po,[d[3]||(d[3]=e("div",{class:"absolute top-5 left-0 right-0 h-0.5 bg-gray-200"},null,-1)),e("div",{class:"absolute top-5 left-0 h-0.5 bg-black transition-all duration-500",style:Te({width:`${t(C).filter(o=>o.completed).length/t(C).length*100}%`})},null,4),e("div",Uo,[(n(!0),r(A,null,B(t(C),(o,y)=>(n(),r("div",{key:y,class:S(["flex flex-col items-center",{"flex-1":y<t(C).length-1}])},[e("div",{class:S(["w-10 h-10 rounded-full flex items-center justify-center z-10 transition-colors",[o.completed?"bg-black text-white":o.is_current?"bg-blue-500 text-white animate-pulse":"bg-gray-200 text-gray-400"]])},[m(w,{name:I(o),class:"w-5 h-5"},null,8,["name"])],2),e("span",{class:S(["mt-2 text-xs font-medium text-center max-w-[80px]",o.completed||o.is_current?"text-gray-900":"text-gray-400"])},s($(o)),3),o.date&&o.completed?(n(),r("span",Mo,s(h(o.date)),1)):p("",!0)],2))),128))])])]),e("div",Eo,[(n(!0),r(A,null,B(t(C),(o,y)=>(n(),r("div",{key:y,class:"flex items-start gap-3"},[e("div",Fo,[e("div",{class:S(["w-8 h-8 rounded-full flex items-center justify-center shrink-0",[o.completed?"bg-black text-white":o.is_current?"bg-blue-500 text-white animate-pulse":"bg-gray-200 text-gray-400"]])},[m(w,{name:I(o),class:"w-4 h-4"},null,8,["name"])],2),y<t(C).length-1?(n(),r("div",{key:0,class:S(["w-0.5 h-8 mt-1",o.completed?"bg-black":"bg-gray-200"])},null,2)):p("",!0)]),e("div",Oo,[e("p",{class:S(["text-sm font-medium",o.completed||o.is_current?"text-gray-900":"text-gray-400"])},s($(o)),3),o.date&&o.completed?(n(),r("p",zo,s(h(o.date)),1)):p("",!0)])]))),128))])]),e("div",Lo,[e("h2",No,s(t(c)("account.orders.detail.items.title")),1),e("div",Ao,[(n(!0),r(A,null,B(t(a).items,o=>(n(),r("div",{key:o.id||o.variant_uuid,class:"flex gap-4 py-4 first:pt-0 last:pb-0"},[e("div",Bo,[e("img",{src:t(me)(o.image,"thumb"),alt:o.name,class:"w-full h-full object-cover"},null,8,qo)]),e("div",Vo,[e("h3",Ko,s(o.name),1),Y(o.attributes)?(n(),r("p",Ho,s(Y(o.attributes)),1)):p("",!0),e("p",Go,s(t(c)("account.orders.detail.items.quantity"))+": "+s(o.quantity)+" Ã "+s(N(o.unit_price)),1)]),e("div",Qo,[e("p",Yo,s(N(o.total)),1),o.discount_amount>0?(n(),r("p",Jo," -"+s(N(o.discount_amount)),1)):p("",!0)])]))),128))])]),e("div",Wo,[e("div",Xo,[e("div",Zo,[e("h3",en,[m(w,{name:"i-lucide-map-pin",class:"w-5 h-5"}),x(" "+s(t(c)("account.orders.detail.addresses.delivery")),1)]),e("address",tn,[x(s(t(a).delivery_address.address_line1),1),d[5]||(d[5]=e("br",null,null,-1)),t(a).delivery_address.address_line2?(n(),r("span",sn,[x(s(t(a).delivery_address.address_line2),1),d[4]||(d[4]=e("br",null,null,-1))])):p("",!0),x(" "+s(t(a).delivery_address.postal_code)+" "+s(t(a).delivery_address.city),1),d[6]||(d[6]=e("br",null,null,-1)),x(" "+s(t(a).delivery_address.country),1)])]),e("div",on,[e("h3",nn,[m(w,{name:"i-lucide-file-text",class:"w-5 h-5"}),x(" "+s(t(c)("account.orders.detail.addresses.billing")),1)]),e("address",an,[x(s(t(a).billing_address.address_line1),1),d[8]||(d[8]=e("br",null,null,-1)),t(a).billing_address.address_line2?(n(),r("span",rn,[x(s(t(a).billing_address.address_line2),1),d[7]||(d[7]=e("br",null,null,-1))])):p("",!0),x(" "+s(t(a).billing_address.postal_code)+" "+s(t(a).billing_address.city),1),d[9]||(d[9]=e("br",null,null,-1)),x(" "+s(t(a).billing_address.country)+" ",1),t(a).billing_address.tax_id?(n(),r("span",cn," NIF: "+s(t(a).billing_address.tax_id),1)):p("",!0)])]),t(a).discount_info||t(a).total_discount>0?(n(),L(se,{key:0,"discount-info":t(a).discount_info,"total-discount":t(a).total_discount},null,8,["discount-info","total-discount"])):p("",!0),t(a).shipments.length>0?(n(),L(ie,{key:1,"order-uuid":t(a).order_uuid,shipments:t(a).shipments,onStatusUpdated:K},null,8,["order-uuid","shipments"])):p("",!0)]),e("div",ln,[t(a).payment&&t(a).payment.length>0?(n(),L(de,{key:0,payments:t(a).payment},null,8,["payments"])):p("",!0),e("div",dn,[e("h3",un,[m(w,{name:"i-lucide-receipt",class:"w-5 h-5"}),x(" "+s(t(c)("account.orders.detail.summary.title")),1)]),e("div",_n,[e("div",mn,[e("span",pn,s(t(c)("account.orders.detail.summary.subtotal")),1),e("span",gn,s(N(t(a).total_net+t(a).total_discount)),1)]),t(a).total_discount>0?(n(),r("div",fn,[e("span",yn,s(t(c)("account.orders.detail.summary.discount")),1),e("span",hn,"-"+s(N(t(a).total_discount)),1)])):p("",!0),e("div",xn,[e("span",bn,s(t(c)("account.orders.detail.summary.shipping")),1),t(a).discount_info?.has_free_shipping?(n(),r("span",vn,s(t(c)("account.orders.detail.summary.freeShipping")),1)):(n(),r("span",kn,s(N(t(a).shipment_total)),1))]),e("div",wn,[e("span",$n,s(t(c)("account.orders.detail.summary.vat")),1),e("span",Dn,s(N(t(a).vat)),1
1)]),e("div",jn,[e("span",Tn,s(t(c)("account.orders.detail.summary.total")),1),e("span",In,s(N(t(a).total)),1)])])]),t(W).length>0?(n(),r("div",Cn,[e("h3",Sn,[m(w,{name:"i-lucide-files",class:"w-5 h-5"}),x(" "+s(t(c)("account.orders.detail.documents.title")),1)]),e("div",Rn,[(n(!0),r(A,null,B(t(W),o=>(n(),r("div",{key:o.id,class:"flex items-center justify-between gap-3 py-3 first:pt-0 last:pb-0"},[e("div",Pn,[e("div",Un,[m(w,{name:"i-lucide-file-text",class:"w-5 h-5 text-gray-500"})]),e("div",null,[e("p",Mn,s(o.typeLabel),1),e("p",En,s(o.document_number)+"/"+s(o.series),1)])]),m(J,{variant:"ghost",color:"neutral",size:"sm",icon:"i-lucide-download",onClick:y=>X(o.document_path)},{default:O(()=>[x(s(t(c)("account.orders.detail.documents.download")),1)]),_:1},8,["onClick"])]))),128))])])):p("",!0),t(a).is_refundable?(n(),r("div",Fn,[m(J,{variant:"soft",color:"neutral",class:"w-full",icon:"i-lucide-refresh-cw",onClick:i},{default:O(()=>[x(s(t(c)("account.orders.detail.actions.requestRefund")),1)]),_:1}),e("div",On,[m(w,{name:"i-lucide-check-circle",class:"w-5 h-5"}),e("span",null,s(t(c)("account.orders.refundable")),1)])])):p("",!0),e("div",zn,[e("h3",Ln,[m(w,{name:"i-lucide-message-circle",class:"w-5 h-5"}),x(" "+s(t(c)("account.orders.detail.support.title")),1)]),m(J,{variant:"outline",color:"neutral",class:"w-full",icon:"i-lucide-message-circle",onClick:d[0]||(d[0]=o=>g.value=!0)},{default:O(()=>[x(s(t(c)("account.orders.detail.actions.contactSupport")),1)]),_:1})])])])])):p("",!0),t(a)?(n(),L(Z,{key:4,open:t(R),"onUpdate:open":d[1]||(d[1]=o=>te(R)?R.value=o:null),order:t(a),onSuccess:D},null,8,["open","order"])):p("",!0),t(a)?(n(),L(ue,{key:5,open:t(g),"onUpdate:open":d[2]||(d[2]=o=>te(g)?g.value=o:null),"preselected-order-id":t(a).id},null,8,["open","preselected-order-id"])):p("",!0)]),_:1})])}}});export{Kn 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.