import{l as a,v as e,_ as s}from"./utils-lib.js?v=20260328163632";import{a as l}from"./index214.js?v=20260328163632";import{u as t}from"./index.vue_vue_type_script_setup_true_lang9.js?v=20260328163632";import{k as o,r as u,o as p,V as i,W as r,O as n,Y as v,N as m,X as c,Z as d,a3 as _,F as x,L as f,_ as j,j as b}from"./base-lib.js?v=20260328163632";import{b as y,k as g,au as h,l as w}from"./naive-ui.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";import"./index.vue_vue_type_script_setup_true_lang23.js?v=20260328163632";import"./site.js?v=20260328163632";import"./index84.js?v=20260328163632";import"./store4.js?v=20260328163632";import"./useMethod4.js?v=20260328163632";import"./index.vue_vue_type_script_setup_true_lang10.js?v=20260328163632";import"./index158.js?v=20260328163632";import"./ace.js?v=20260328163632";import"./index91.js?v=20260328163632";import"./index88.js?v=20260328163632";import"./index118.js?v=20260328163632";import"./logs.js?v=20260328163632";const k={class:"p-20px"},C={class:"mb-[8px] border-light"},D={class:"flex justify-between items-center bg-[var(--bg-color-23)] py-[10px] pl-[10px]"},E={class:"max-h-[200px] overflow-auto"},I=s(o({__name:"select-exist-domain",props:{compData:{default:{onConfirm:()=>{}}}},setup(s,{expose:o}){const I=s,{getDomainListEvent:L}=t(),O=u(""),U=u([]),A=u(""),F=u([]),H=a=>{U.value=[],F.value.forEach((e=>{e.name.indexOf(a)>-1&&U.value.push(e)})),U.value.length||(U.value=F.value)};return p((async()=>{var a,e;try{const s=await L(),l=new Set(s.data.map((a=>a.name))),t=Array.from(l);U.value=t.map((a=>({label:a,value:a}))),A.value=(null==(e=null==(a=U.value)?void 0:a[0])?void 0:e.value)||"",F.value=U.value}catch(s){}})),o({onConfirm:async()=>I.compData.onConfirm(A.value)}),(s,t)=>{const o=y,u=g,p=h,I=w;return i(),r("div",k,[n(o,{class:"!w-[530px] mb-[16px]",value:v(O),"onUpdate:value":t[0]||(t[0]=a=>m(O)?O.value=a:null),placeholder:v(a)("支持字段模糊搜索"),onInput:H,clearable:""},null,8,["value","placeholder"]),c("div",C,[c("div",D,d(v(a)("域名")),1),c("div",E,[n(I,{value:v(A),"onUpdate:value":t[1]||(t[1]=a=>m(A)?A.value=a:null),class:"w-full custom-radio-group"},{default:_((()=>[n(p,{vertical:"",class:"w-full"},{default:_((()=>[(i(!0),r(x,null,f(v(U),((a,e)=>(i(),j(u,{key:a.value,value:a.value,class:"whitespace-nowrap py-[2px] w-full"},{default:_((()=>[b(d(a.label),1)])),_:2},1032,["value"])))),128))])),_:1})])),_:1},8,["value"])])]),n(v(e),{options:v(l),class:"!mt-10px"},null,8,["options"])])}}}),[["__scopeId","data-v-1cc4241e"]]);export{I as default};
