1import{u as R,_ as B,L as P,a as S}from"./SfoHN6Ed.js";import{_ as F}from"./6HuN2jx9.js";import{p as V}from"./CCcf-sl9.js";import{u as j}from"./CDvk6DpT.js";import{u as M}from"./0Zil6o2A.js";import{d as y,e as n,f as a,B as w,h as e,g as r,p,l as g,k as C,t as c,j as m,i as h,r as k,C as N,w as x,M as T,b as U,s as b}from"./CFxGRstO.js";import{_ as D}from"./DlAUqK2U.js";import{_ as q}from"./Crz1aqcp.js";import"./Bnx8nLGV.js";import{u as W}from"./DKVv9OHQ.js";import"./LVdPJ0Yr.js";import"./DnMM_Yjt.js";import"./CICNJ14-.js";import"./B6H6uuii.js";import"./Cpj98o6Y.js";import"./BWBHGvIx.js";import"./CwOHyHLb.js";import"./owSR78tJ.js";import"./C5U6HIMD.js";import"./CbPSoDvq.js";import"./GtZFfx2K.js";import"./Bl79MI2C.js";import"./DzpbyIkv.js";import"./CdviQ7zO.js";import"./C16c000V.js";const E={key:1},z={key:0},G={key:0,class:"!tw-text-success"},H={key:1,class:"!tw-text-danger"},J={key:1,class:"tw-text-center"},K={key:0},Q=["xlink:href"],X=y({__name:"Item",props:{isReseller:{type:Boolean},hideInvoice:{type:Boolean},order:{}},setup(o){const t=o,s=j(t.order),d=k("#ico-print"),_=M().formatDate(t.order.creation_date,"long");return(i,l)=>{const u=F;return n(),a(w,null,[e("td",null,[r(s).notRefunded&&r(s).notReversed?(n(),p(u,{key:0,to:`/account/orders/${o.order.id}`},{default:g(()=>[C(c(o.order.id),1)]),_:1},8,["to"])):(n(),a("span",E,c(o.order.id),1))]),o.isReseller?(n(),a("td",z,c(o.order.customer_email),1)):m("",!0),e("td",null,c(r(_)),1),e("td",null,c(("priceFormat"in i?i.priceFormat:r(V))(o.order.total,o.order.currency_sign,o.order.currency_sign_before_value)),1),e("td",null,c(o.order.payment_system?.label),1),e("td",null,[r(s).isPaid?(n(),a("span",G,c(o.order.statusLabel),1)):r(s).isRefunded||r(s).isReversed?(n(),a("span",H,c(i.$t("account.payments_history.order_list.refunded")),1)):m("",!0)]),o.hideInvoice?m("",!0):(n(),a("td",J,[r(s).hasInvoice?(n(),a("span",K,[h(u,{to:`/account/orders/invoice/${o.order.id}`,target:"_blank",class:"download-invoice"},{default:g(()=>[(n(),a("svg",{class:"tw-inline",width:"24px",height:"24px",onMouseover:l[0]||(l[0]=f=>d.value="#ico-print-outline"),onMouseout:l[1]||(l[1]=f=>d.value="#ico-print")},[e("use",{"xlink:href":r(d)},null,8,Q)],32))]),_:1},8,["to"])])):m("",!0)]))],64)}}}),Y=Object.assign(X,{__name:"AccountOrderItem"}),Z={class:"orderlist-table !tw-py-4 lg:!tw-py-6"},tt={class:"tw-text-h2 tw-mb-2"},et={class:"table-responsive-xl"},ot={class:"table"},st={class:"orderlist-header"},nt={key:0,scope:"col"},rt={scope:"col"},ct={scope:"col"},at={scope:"col"},it={scope:"col"},lt={key:1,scope:"col",width:"12%"},dt=y({__name:"List",props:{isReseller:{type:Boolean},hideInvoice:{type:Boolean},orders:{}},setup(o){return(t,s)=>{const d=Y;return n(),a("div",Z,[e("h2",tt,c(t.$t("account.payments_history.title")),1),e("div",et,[e("table",ot,[e("thead",st,[e("tr",null,[s[0]||(s[0]=e("th",{scope:"col"}," # ",-1)),o.isReseller?(n(),a("th",nt,c(t.$t("account.payments_history.order_list.client")),1)):m("",!0),e("th",rt,c(t.$t("account.payments_history.order_list.date")),1),e("th",ct,c(t.$t("account.payments_history.order_list.amount")),1),e("th",at,c(t.$t("account.payments_history.order_list.method")),1),e("th",it,c(t.$t("account.payments_history.order_list.status")),1),o.hideInvoice?m("",!0):(n(),a("th",lt,c(t.$t("account.payments_history.order_list.invoice")),1))])]),e("tbody",null,[(n(!0),a(w,null,N(o.orders,_=>(n(),a("tr",{key:_.id},[h(d,{order:_,"hide-invoice":""},null,8,["order"])]))),128))])])])])}}}),I=Object.assign(D(dt,[["__scopeId","data-v-d2b57fa5"]]),{__name:"AccountOrderList"});async function _t(){const{data:o,count:t,query:s}=await R("orders","/api/account/reseller-orders");return{orders:o,count:t,query:s}}const ut={class:"tw-flex tw-justify-center"},mt=y({__name:"PartnersOrderList",async setup(o){let t,s;const{count:d,orders:_,query:i}=([t,s]=x(()=>_t()),t=await t,s(),t),l=k(i.search||"");function u(){i.page=1,i.search=l.value}return(f,v)=>{const L=B,O=I,A=S;return n(),a("div",null,[h(L,{modelValue:r(l),"onUpdate:modelValue":v[0]||(v[0]=$=>T(l)?l.value=$:null),onSearch:u},null,8,["modelValue"]),h(O,{orders:r(_)},null,8,["orders"]),e("div",ut,[h(A,{"current-page":r(i).page,"onUpdate:currentPage":v[1]||(v[1]=$=>r(i).page=$),total:r(d),"per-page":"LIMIT"in f?f.LIMIT:r(P)},null,8,["current-page","total","per-page"])])])}}}),pt=Object.assign(mt,{__name:"AccountPartnersOrderList"}),ht=y({__name:"UserOrderList",async setup(o){let t,s;const d=([t,s]=x(()=>U("/api/account/orders")),t=await t,s(),t),{isReseller:_}=b();return(i,l)=>{const u=I;return n(),p(u,{orders:r(d),"is-reseller":r(_)},null,8,["orders","is-reseller"])}}}),yt=Object.assign(ht,{__name:"AccountUserOrderList"}),ft={class:"tw-text-h2 !tw-text-yellow tw-text-center tw-mb-2"},vt={class:"account-orders"},$t={class:"container"},gt={class:"tw-py-4 md:tw-pt-12"},Gt=y({__name:"index",setup(o){const{isReseller:t}=b(),{openSurveyIfAvailable:s}=W();return s(),(d,_)=>{const i=pt,l=yt,u=q;return n(),p(u,{"active-item":"payments"},{default:g(()=>[e("h1",ft,c(d.$t("account.payments_history.title")),1),e("section",vt,[e("div",$t,[e("div",gt,[e("div",null,[r(t)?(n(),p(i,{key:0})):(n(),p(l,{key:1}))])])])])]),_:1})}}});
1export{Gt 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.