import{c as e,g as s,e as l,C as a,U as t,v as r,N as o,y as m}from"./base-lib.js?v=1761009159";import{K as p,k as i,bq as u,c5 as n}from"./utils-lib.js?v=1761009159";import{aI as d}from"./validator.js?v=1761009159";import{i as c,o as j}from"./useController13.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";import"./column.js?v=1761009159";import"./site.js?v=1761009159";import"./index105.js?v=1761009159";import"./useStore12.js?v=1761009159";import"./useStore4.js?v=1761009159";import"./useController6.js?v=1761009159";import"./useController5.js?v=1761009159";import"./useMethod5.js?v=1761009159";import"./useController4.js?v=1761009159";import"./useStore10.js?v=1761009159";const b=e({__name:"ssl-expire-configure",setup(e,{expose:b}){const{BtForm:y,submit:x}=p({data:()=>{const{data:e}=c();return e||{id:0,dueAlarm:!1,domainName:"",cycle:30,allSsl:!1,push:[]}},options:e=>s(()=>[{type:"switch",label:"到期提醒",key:"dueAlarm"},{type:"input",label:"设置站点",key:"domainName",attrs:{width:"28rem",disabled:!0}},{type:"custom",render:()=>l(u,{label:"证书有效期",prop:"cycle"},{default:()=>[l("div",{class:"text-small flex"},[l("span",{class:"mr-4px"},[a("小于")]),l(i,{modelValue:e.value.cycle,"onUpdate:modelValue":s=>e.value.cycle=s,class:"!w-[10rem]",type:"number"},null),l("span",{class:"ml-4px"},[a("天，将每天发送1次提醒。")])])]}),rules:{cycle:[n({message:"请输入证书到期提示时间"}),{validator:(e,s,l)=>{/^[1-9]\d*$/.test(s)?l():l(new Error("请输入大于0的整数"))},trigger:["blur","change","input"]}]}},d("通知方式","push",{rules:{push:[n({message:"请选择通知方式"})]}}),{type:"custom",render:()=>l(u,{label:"应用配置"},{default:()=>[l(t,{modelValue:e.value.allSsl,"onUpdate:modelValue":s=>e.value.allSsl=s,name:"type"},{default:()=>[a("将当前配置应用到所有"),l("span",{class:"text-danger"},[a("未设置过的站点")])]})]})}]),submit:j});return b({onConfirm:x}),(e,s)=>(r(),o(m(y),{class:"p-[16px]","label-width":"100px"}))}});export{b as default};
