import{_ as x}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{t as y}from"./utils-DELCcnjr.js?v=1773287522785";import{T as S}from"./ssl-Bm8jcneQ.js?v=1773287522785";import{k as h,R as T,r as L,e as k,$ as C,Z as D,a0 as n,a9 as l,S as o}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{a1 as $,_ as R,a6 as q}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./index-BTglIPU2.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./index-S15tYq5l.js?v=1773287522785";const B={class:"p-20px"},V=h({__name:"set-ttl",props:{rows:{},refresh:{}},setup(i,{expose:u}){const{t:p}=T(),c=i,{rows:d,refresh:r}=c,m=L(null),t=k({ttl:null,record_type:"A"}),f={record_value:{required:!0,trigger:["blur","change"],message:p("SSL.Domain.index_14")},ttl:{required:!0,trigger:"blur",type:"number",message:p("SSL.Domain.index_15")}},g=()=>({domains:JSON.stringify(d.map(e=>e.name)),...t});return u({onConfirm:async()=>{var e;await((e=m.value)==null?void 0:e.validate()),await S(g()),r==null||r()}}),(e,a)=>{const b=R,_=$,v=q,w=x;return C(),D("div",B,[n(w,{ref_key:"formRef",ref:m,model:o(t),rules:f,"label-width":"100"},{default:l(()=>[n(_,{label:"TTL",path:"ttl"},{default:l(()=>[n(b,{"show-button":!1,class:"w-300px!",value:o(t).ttl,"onUpdate:value":a[0]||(a[0]=s=>o(t).ttl=s),placeholder:e.$t("SSL.Domain.index_15")},null,8,["value","placeholder"])]),_:1}),n(_,{label:e.$t("Ftp.Table.index_3"),path:"record_type"},{default:l(()=>[n(v,{class:"w-300px",value:o(t).record_type,"onUpdate:value":a[1]||(a[1]=s=>o(t).record_type=s),options:o(y)},null,8,["value","options"])]),_:1},8,["label"])]),_:1},8,["model"])])}}});export{V as default};
