1import{u as q}from"./C5oLZy4O.js";import{d as F,u as G,E as H,y as J,s as K,k as v,X as Q,B as R,x as Y,c as Z,a as t,t as l,b as c,w as n,h as i,U as C,j as m,o as E,e as u,l as ee,n as te,O as I,i as se}from"./CYMs3uwY.js";const ae={class:"incoming-offers-container"},ne={class:"title"},oe={class:"dashboard-list"},le={class:"panel-head"},ie={class:"panel-text"},re={class:"panel-head"},ce={class:"panel-text"},de={class:"panel-head"},fe={class:"panel-text"},ue=["onClick"],pe=F({__name:"index",async setup(me){let g,$;const{t:r}=G(),L=H(),{currency:O}=J(),{fetchIncomingList:P,fetchCloseOffer:T}=([g,$]=K(()=>q()),g=await g,$(),g),k=v(!1),M=[{key:"domain",title:r("domain-name"),clickable:!0,style:{td:{fontSize:"16px",whiteSpace:"nowrap"}}},{key:"newest-more",title:""},{key:"newestMessage",title:r("newest-message"),clickable:!0,style:{td:{maxWidth:"200px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}},{key:"offer",title:r("offer")},{key:"date",title:r("date")},{key:"status",title:r("status")},{key:"settings",title:r("settings")},{key:"close-more",title:""}],d=Q({currency:O,current:1,size:10}),f=v(),h=async s=>{k.value=!0;try{const e=await P(s);f.value=e.data}catch(e){console.error(e)}finally{k.value=!1}},_=s=>s?"#229E94":"#C3C3C3",N=v([{id:0,name:r("domain-manage-page"),title:r("domain-manage-page"),value:0}]),V=v([{id:0,name:r("close-offer"),title:r("close-offer"),value:0}]),D=s=>C(`/account/marketplace/incoming-offers/${s}`),U=()=>{C({path:"/account/manage-domains"})},A=async(s,e)=>{s.value===0&&T(e.offerId).then(()=>{h(d)}).catch(p=>{L.handleError({message:p.msg,duration:2e4})})},W=s=>{C({path:`/account/manage-domains/${s.domain}`})},w=s=>C(`/account/marketplace/incoming-offers/chat-offers/?offerId=${s.offerId}`);return R(()=>d,()=>{h(d)},{deep:!0}),Y(()=>{h(d)}),(s,e)=>{var x,z;const p=m("DynaPanel"),S=m("DynaButton"),b=m("DynaSelect"),j=m("DynaTable"),X=m("DynaEmpty");return E(),Z("div",ae,[t("div",ne,l(s.$t("incoming-offers")),1),t("div",oe,[c(p,{"top-visible":!1,class:"panel"},{default:n(()=>{var o;return[t("div",le,[e[5]||(e[5]=t("i",{class:"fa-regular fa-message-smile"},null,-1)),t("span",null,l(s.$t("active")),1)]),t("div",ie,l(((o=i(f))==null?void 0:o.activeCount)||0),1)]}),_:1}),c(p,{"top-visible":!1,class:"panel panel-pointer",onClick:e[0]||(e[0]=o=>D("closed-offers"))},{default:n(()=>{var o;return[t("div",re,[e[8]||(e[8]=t("i",{class:"fa-regular fa-message-xmark"},null,-1)),t("span",null,[t("span",null,l(s.$t("closed-offers")),1),e[6]||(e[6]=u()),e[7]||(e[7]=t("i",{class:"fa-regular fa-angle-right"},null,-1))])]),t("div",ce,l(((o=i(f))==null?void 0:o.closedCount)||0),1)]}),_:1}),c(p,{"top-visible":!1,class:"panel panel-pointer",onClick:e[1]||(e[1]=o=>D("successful-offers"))},{default:n(()=>{var o;return[t("div",de,[e[11]||(e[11]=t("i",{class:"fa-regular fa-message-check"},null,-1)),t("span",null,[t("span",null,l(s.$t("success")),1),e[9]||(e[9]=u()),e[10]||(e[10]=t("i",{class:"fa-regular fa-angle-right"},null,-1))])]),t("div",fe,l(((o=i(f))==null?void 0:o.successCount)||0),1)]}),_:1})]),c(X,{empty:!((z=(x=i(f))==null?void 0:x.active.records)!=null&&z.length)},{"empty-text":n(()=>[u(l(s.$t("no-active-offers-yet"))+" ",1),c(S,{type:"dark","icon-left":"fa-solid fa-plus",onClick:e[2]||(e[2]=o=>U())},{default:n(()=>[u(l(s.$t("sell-domain")),1)]),_:1})]),default:n(()=>[c(p,null,{"top-free":n(()=>[u(l(s.$t("listing-offers")),1)]),default:n(()=>{var o,B;return[c(j,{current:i(d).current,"onUpdate:current":e[3]||(e[3]=a=>i(d).current=a),size:i(d).size,"onUpdate:size":e[4]||(e[4]=a=>i(d).size=a),loading:i(k),columns:M,data:(o=i(f))==null?void 0:o.active.records,total:(B=i(f))==null?void 0:B.active.total},{domain:n(({row:a})=>[t("span",{onClick:y=>w(a)},l(a.domain),9,ue)]),"newest-more":n(({row:a})=>[c(b,{"model-value":void 0,options:i(N),"only-placeholder":!0,"close-others":"","popup-auto-width":"",onChange:y=>W(a)},{"custom-trigger":n(()=>e[12]||(e[12]=[t("i",{class:"fa-solid fa-ellipsis",style:{"font-size":"20px"}},null,-1)])),_:2},1032,["options","onChange"])]),status:n(({row:a})=>[t("div",{class:"incoming-status",style:I({borderColor:_(a.status.inProgress)})},[t("i",{class:"fa-solid fa-circle",style:I({color:_(a.status.inProgress)})},null,4),u(" "+l(a.status.inProgress?s.$t("open"):s.$t("closed")),1
1)],4)]),settings:n(({row:a})=>[c(S,{type:"dark",shape:"round",style:{"font-size":"14px"},"icon-left":"fa-solid fa-messages-dollar",onClick:y=>w(a)},{default:n(()=>[u(l(s.$t("view-chat")),1)]),_:2},1032,["onClick"])]),"close-more":n(({row:a})=>[a.canClose?(E(),ee(b,{key:0,"model-value":void 0,options:i(V),"only-placeholder":!0,"close-others":"","popup-auto-width":"",onChange:y=>A(y,a)},{"custom-trigger":n(()=>e[13]||(e[13]=[t("i",{class:"fa-solid fa-ellipsis-vertical",style:{"font-size":"20px"}},null,-1)])),_:2},1032,["options","onChange"])):te("",!0)]),_:1},8,["current","size","loading","data","total"])]}),_:1})]),_:1},8,["empty"])])}}}),ve=se(pe,[["__scopeId","data-v-4fdd7ea1"]]);export{ve 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.