import{bX as e}from"./site.js?v=20260328163632";import{l as s,t,v as a,x as p}from"./utils-lib.js?v=20260328163632";import{g as l}from"./index.vue_vue_type_script_setup_true_lang9.js?v=20260328163632";import{k as i,a9 as o,c as r,r as u,o as m,V as n,W as c,O as d,Y as v}from"./base-lib.js?v=20260328163632";import"./naive-ui.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.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 j={class:"p-20px"},_=i({__name:"index",props:{compData:{default:{data_template:{},type:"",data:[],help:"",name:"",ps:""}}},setup(i,{expose:_}){const f=i,{data_template:x,type:y,ps:h,help:b}=o(f.compData),g=r((()=>[...(null==h?void 0:h.value)?[{content:h.value}]:[],...(null==b?void 0:b.value)?[{content:b.value}]:[]])),k=r((()=>Object.keys(x.value).filter((e=>!["uuid","ps"].includes(e))).map((e=>({label:e,children:[{type:"input",key:e,attrs:{class:"!w-[340px]",placeholder:s("请输入")+e}}]}))))),w=u({label:s("备注"),children:[{type:"input",key:"ps",attrs:{class:"!w-[340px]",placeholder:s("请输入备注")}}]}),D=u({formAttrs:{labelWidth:90},formItems:[]}),O=r((()=>(D.value.formItems=[...k.value,w.value],D.value))),[N,E,I]=t(O);return m((()=>{Object.keys(x.value).forEach((e=>{E.value[e]=x.value[e]}))})),_({onConfirm:async()=>{let t={ps:E.value.ps};Object.keys(x.value).forEach((e=>{t[e]=E.value[e]}));const a=await p({loading:s("正在配置DNS接口，请稍候..."),request:e({dnsName:y.value,pdata:JSON.stringify(t)}),message:!0});if(f.compData.refresh?await f.compData.refresh():await l(),a.status)return a.status}}),(e,s)=>(n(),c("div",j,[d(v(N)),d(v(a),{options:v(g)},null,8,["options"])]))}});export{_ as default};
