1import{_ as H}from"./BvWtaWD2.js";import{d as P,E as J,u as T,k as v,Q as W,l as U,w as h,j as E,o as l,a as e,h as t,t as s,b as K,e as g,c as d,n as I,L as F,g as $,R as M,m as q,a0 as N,_ as X,i as z,s as Y,F as Z,K as ee,r as te,a2 as se,O as ie}from"./CYMs3uwY.js";import{u as R}from"./DfJeP3mH.js";import"./CFprKcbD.js";import"./BbeJfLC5.js";import"./BhCObGnq.js";import"./rOmQOW4P.js";const ae={class:"option-account-content"},ne={class:"logo"},oe=["src"],le={class:"content"},re={key:0,class:"inform"},de={class:"avatar"},ce=["src"],ue={class:"info"},pe={class:"author"},ve={class:"email"},me={class:"active"},_e={key:1,class:"input-from"},ye=["placeholder"],fe={style:{"margin-top":"12px"}},ke=["placeholder"],he={class:"tips-items"},ge=P({__name:"optionAccount",props:{isShowOverlay:{type:Boolean},options:{},currenItem:{}},emits:["update:isShowOverlay","refresh"],setup(x,{emit:f}){const b=J(),{t:n}=T(),{registrarMap:V,LinkAccount:m,UnLink:A}=R(),O=x,k=f,c=()=>{k("update:isShowOverlay",!1)},S={link:n("link-account"),edit:n("edit-account")},u=v(""),p=v(""),_=v(!1),r=v(!1),w=v(!1),B=async()=>{if(!u.value||!p.value){b.handleError({message:"Please fill in all fields"}),_.value=!0,r.value=!0;return}w.value=!0,_.value=!1,r.value=!1;const a={apiKey:u.value,apiSecretKey:p.value,registrar:O.currenItem.registrarId},{LinkAccountRes:o}=await m(a);o.value&&o.value.code===200&&(c(),k("refresh"),u.value="",p.value=""),w.value=!1},L=v(!1),i=async()=>{L.value=!0;const a={registrar:O.currenItem.registrarId},{UnLinkRes:o}=await A(a);o.value&&o.value.code===200&&(c(),k("refresh")),L.value=!1},C=a=>{a==="inputValue"&&(_.value=!u.value),a==="apiSecretValue"&&(r.value=!p.value)},j=R();return W(()=>{j.isShowLinkOverlay=!1}),(a,o)=>{const Q=X,D=E("DynaButton"),G=E("DynaOverlay");return l(),U(G,{"model-value":a.isShowOverlay,title:S[a.options],"onUpdate:modelValue":o[4]||(o[4]=y=>k("update:isShowOverlay",y))},{action:h(()=>[K(D,{type:"dark-outline",onClick:c},{default:h(()=>[g(s(t(n)("cancel")),1)]),_:1}),a.currenItem.isLinked?(l(),U(D,{key:0,loading:t(L),class:"button-red",onClick:i},{default:h(()=>[g(s(t(n)("unlink")),1)]),_:1},8,["loading"])):(l(),U(D,{key:1,loading:t(w),type:"dark",onClick:B},{default:h(()=>[g(s(t(n)("add")),1)]),_:1},8,["loading"]))]),default:h(()=>[e("div",ae,[e("div",ne,[e("img",{src:t(V)[a.currenItem.registrarId]},null,8,oe),e("span",null,s(a.currenItem.registrar),1)]),e("div",le,[e("span",null,s(t(n)("linking-your-account-from-another-registrar-will-allow-nameclub-to-quickly-identify-which-account-to-send-the-purchased-domain-to-linking-via-api-is-also-used-to-import-your-domains-from-another-registrar")),1),K(Q,{class:"api-key",to:"https://www.dynadot.com/account/domain/setting/api.html",target:"_blank"},{default:h(()=>[g(s(t(n)("Obtain Api Key")),1)]),_:1})]),a.currenItem.isLinked?(l(),d("div",re,[e("div",de,[a.currenItem.avatar?(l(),d("img",{key:0,src:a.currenItem.avatar},null,8,ce)):I("",!0)]),e("div",ue,[e("div",pe,s(a.currenItem.username),1),e("div",ve,s(a.currenItem.email),1)]),e("div",me,[e("div",{class:F(a.currenItem.isLinked?"dot solid":"dot empty")},null,2),e("span",null,s(t(n)("active")),1)])])):(l(),d("div",_e,[e("label",null,[g(s(t(n)("API Production Key"))+" ",1),$(e("input",{"onUpdate:modelValue":o[0]||(o[0]=y=>q(u)?u.value=y:null),type:"text",placeholder:t(n)("enter-api-key"),onBlur:o[1]||(o[1]=y=>C("inputValue"))},null,40,ye),[[M,t(u)]])]),$(e("span",{class:"from-item-required"},s(t(n)("this-field-is-required")),513),[[N,t(_)]]),e("label",fe,[g(s(t(n)("Secret Key"))+" ",1),$(e("input",{"onUpdate:modelValue":o[2]||(o[2]=y=>q(p)?p.value=y:null),type:"text",class:"api-key-input",placeholder:t(n)("enter-api-key"),onBlur:o[3]||(o[3]=y=>C("apiSecretValue"))},null,40,ke),[[M,t(p)]])]),$(e("span",{class:"from-item-required"},s(t(n)("this-field-is-required")),513),[[N,t(r)]]),e("span",he,s(a.$t("Tips: After generating the Dynadot API Key, Please wait 10 minutes for binding to avoid the Dynadot API Key failing to bind error if it does not take effect in time.")),1)]))])]),_:1},8,["model-value","title"])}}}),Se=z(ge,[["__scopeId","data-v-ea51c102"]]),we={class:"linked-registrars-container"},Le={class:"linked-registrars-top"},Ie={class:"linked-registrars-content"},$e={class:"list-item-left"},be=["src"],Ae={key:0,class:"list-item-notes"},Oe={class:"list-item-right"},Ce={key:0,class:"list-item-inform"},Ke={class:"list-item-avatar"},Re=["src"],Ve={class:"list-item-author"},Be={class:"list-item-email"},De=["onClick"],Ue={class:"list-item-option"},qe=["onClick"],xe={class:"list-item-option"},Ee=P({__name:"index",async setup(x){let f,b;const{registrarMap:n}=R(),V=R(),{t:m}=T(),{data:A,status:O,refresh:k}=([f,b]=Y(()=>se.get("/user-cp/linked-registrar/list")),f=await f,b(),f),c=v(!1),S=v("link"),u=v(),p=(_,r)=>{S.value=_,u.value=r,c.value=!c.value};return V.isShowLinkOverlay&&(S.value="link",u.value=A.value[0],c.value=!c.value),(_,r)=>{const w=H,B=Se,L=te("loading");return l(),d("div",we,[K(w,{title:"Linked Registrars"}),K(B,{"is-show-overlay":t(c),"onUpdate:isShowOverlay":r[0]||(r[0]=i=>q(c)?c.value=i:null),options:t(S),"curren-item":t(u),onRefresh:t(k)},null,8,["is-show-overlay","options","curren-item","onRefresh"]),e("div",Le,[e("span",null,s(t(m)("other-registrars")),1),r[1]||(r[1]=e("span",null,null,-1))]),$((l(),d("div",Ie,[(l(!0),d(Z,null,ee(t(A),(i,C)=>(l(),d("div",{key:C,class:"linked-registrars-list-item"},[e("div",$e,[e("img",{src:t(n)[i.registrarId],alt:"logo"},null,8,be),e("span",null,s(i.registrar),1),e("div",{class:F(i.isLinked?"list-item-dot solid":"list-item-dot empty")},null,2),i.fastTransferEligible?(l(),d("div",Ae,s(t(m)("fast-transfer-eligible")),1)):I("",!0),i.isLinked?(l(),d("div",{key:1,class:"list-item-notes",style:ie({marginLeft:"10px",padding:"6px 12px",backgroundColor:i.apiKeyStatus?"rgb(182 209 206 / 0.2)":"rgb(248 215 218 / 0.2)",color:i.apiKeyStatus?"#2f6f62":"#b42318"})},s(i.apiKeyStatus?t(m)("Api Key Activated"):t(m)("Api Key Not Activated")),5)):I("",!0)]),e("div",Oe,[i.isLinked?(l(),d("div",Ce,[e("div",Ke,[i.avatar?(l(),d("img",{key:0,src:i.avatar},null,8,Re)):I("",!0)]),e("div",null,[e("div",Ve,s(i.username),1),e("div",Be,s(i.email),1)])])):I("",!0),e("div",null,[i.isLinked?(l(),d("div",{key:0,class:"list-item-edit",onClick:()=>p("edit",i)},[r[2]||(r[2]=e("i",{class:"fa-light fa-pen"},null,-1)),e("div",Ue,s(t(m)("edit")),1)],8,De)):(l(),d("div",{key:1,class:"list-item-link",onClick:()=>p("link",i)},[r[3]||(r[3]=e("i",{class:"fa-regular fa-link-simple"},null,-1)),e("div",xe,s(t(m)("link-account")),1)],8,qe))])])]))),128))])),[[L,t(O)==="pending"]])])}}}),Qe=z(Ee,[["__scopeId","data-v-295ee7b8"]]);export{Qe 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.