import{c as s,t as a,g as e,e as t,T as r,aS as o,C as l,q as i,a6 as m,I as p,y as u,v as n,x as c,bu as d}from"./base-lib.js?v=1761009159";import{K as j}from"./utils-lib.js?v=1761009159";import{b as g,j as b,h as v}from"./form-item.js?v=1761009159";import{j as h,k as f,l as x,n as w,o as E,p as H,q as O,s as _}from"./index59.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";import"./useMethod7.js?v=1761009159";import"./validator.js?v=1761009159";import"./column.js?v=1761009159";import"./site.js?v=1761009159";import"./index105.js?v=1761009159";import"./useMethod6.js?v=1761009159";import"./firewall.js?v=1761009159";import"./useStore5.js?v=1761009159";import"./useMethod9.js?v=1761009159";const y={class:"py-[1.6rem] px-[3rem]"},L=s({__name:"index",props:{compData:{type:Object,default:()=>({})}},setup(s,{expose:L}){const q=s,{isEdit:I}=a(q.compData),{BtForm:C,submit:M}=j({data:()=>h.value,options:s=>e(()=>[g("标签名","tag",{attrs:{placeholder:"请输入标签名",class:"w-[30rem]",disabled:I.value},rules:[{required:!0,message:"请输入标签名",trigger:"blur"},{pattern:/^[a-zA-Z0-9_]+$/,message:"标签名只能包含字母、数字和下划线",trigger:"blur"},{max:10,message:"标签名最多10个字符",trigger:"blur"}]}),b("IP地址","ip",x.value,{attrs:{placeholder:"请选择IP地址",class:"!w-[30rem]",onChange:a=>{s.value.ipv=f(a)}},rules:[{required:!0,message:"请选择IP地址",trigger:"blur"}]}),v("HELO/EHLO",()=>t("div",{class:"flex items-center"},[t(r,{modelValue:s.value.helo,"onUpdate:modelValue":a=>s.value.helo=a,placeholder:"请输入HELO/EHLO",class:"!w-[30rem]"},null),t(o,{content:"用于HELO/EHLO的域名，绑定之后也可用于其它域名，不影响发送邮件",placement:"top"},{default:()=>[t("span",{class:"ml-8px bt-ico-ask"},[l("?")])]})]),"helo")]),submit:async(s,a)=>(await a(),I.value?await w(s.value):await E(s.value))});return i(()=>{H()}),m(()=>{O()}),L({onConfirm:async()=>{try{return await M()}catch(s){return!1}}}),(s,a)=>{const e=d;return p((n(),c("div",y,[t(u(C))])),[[e,u(_)]])}}});export{L as default};
