import{l as e,dP as s,t,v as r}from"./utils-lib.js?v=20260328163632";import{i,b as a,a as o}from"./index214.js?v=20260328163632";import{k as p,c as m,r as n,V as l,W as u,O as _,Y as d}from"./base-lib.js?v=20260328163632";import"./naive-ui.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";import"./index.vue_vue_type_script_setup_true_lang9.js?v=20260328163632";import"./index84.js?v=20260328163632";import"./store4.js?v=20260328163632";import"./useMethod4.js?v=20260328163632";import"./site.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";import"./index.vue_vue_type_script_setup_true_lang23.js?v=20260328163632";const j={class:"p-20px"},v=p({__name:"custom-domain",props:{compData:{default:{onConfirm:()=>{}}}},setup(p,{expose:v}){const c=p,x=m((()=>({label:e("自定义域名"),ruleKey:"domains",rules:[{validator:(t,r)=>""!==r&&r?r&&!s(r)?new Error(e("域名格式错误，请重新输入")):!(!i.value&&r.indexOf("*")>-1)||new Error(e("当前为单域名证书，不支持通配符申请")):new Error(e("域名不能为空")),trigger:["blur","input"]}],children:[{type:"input",key:"domains",attrs:{placeholder:e("请输入需要申请证书的{0}，必填项，例如：{1}",[a.value?e("IP（IP证书）"):e("域名（单域名证书）"),a.value?"192.168.1.1":"www.bt.cn"]),class:"!w-[400px]",clearable:!0}}]}))),f=n({formAttrs:{labelWidth:90},formItems:[]}),b=m((()=>(f.value.formItems=[x.value],f.value))),[w,y,g]=t(b);return v({onConfirm:async()=>(await g.value.validate(),c.compData.onConfirm(y.value))}),(e,s)=>(l(),u("div",j,[_(d(w)),_(d(r),{options:d(o),class:"!mt-10px"},null,8,["options"])]))}});export{v as default};
