import{c as a,t as e,g as s,e as t,ae as r,U as l,C as u,G as n,a7 as d,v as o,x as i,z as m,y as p}from"./base-lib.js?v=1761009159";import{u as c,K as f,bq as y,P as b}from"./utils-lib.js?v=1761009159";import{aI as _,p as v}from"./validator.js?v=1761009159";import{C as g,j}from"./store5.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";import"./column.js?v=1761009159";const w=a({__name:"alarm",setup(a){const{payment:w}=c(),{authType:h}=e(w.value),{BtForm:x,submit:q}=f({data:async()=>{const{data:a}=await(async()=>{const{data:a}=await j(),{status:e,safe_type:s,sender:t}=a.data.alertable;return{data:{status:e,safe_type:s,sender:t}}})();return a.sender.length>0&&(a.sender=a.sender.filter(a=>{if(a&&""!==a)return a})),a||{sender:[],status:!1,safe_type:[]}},options:a=>s(()=>[{type:"switch",label:"告警开关",key:"status"},{type:"custom",render:()=>t(y,{label:"类型"},{default:()=>[t(r,{modelValue:a.value.safe_type,"onUpdate:modelValue":e=>a.value.safe_type=e},{default:()=>[t(l,{value:"webshell"},{default:()=>[u("恶意文件告警")]})]})]})},_("通知方式","sender",{attrs:{class:"!w-24rem",limit:["sms"]},rules:{sender:[{required:!0,message:"请选择告警方式",trigger:"change"}]}}),{type:"custom",render:()=>t(y,{label:" "},{default:()=>[t(n,{type:"primary",onClick:q},{default:()=>["保存"]})]})}]),submit:async(a,e)=>{"ltd"===h.value?(await e(),await b({loading:"正在保存配置，请稍后...",request:g(d(a.value)),message:!0})):v({sourceId:68})}});return(a,e)=>(o(),i("div",null,[e[0]||(e[0]=m("div",{class:"text-large mb-6"},"全局告警设置",-1)),t(p(x))]))}});export{w as default};
