import{_ as $}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{_ as R}from"./index.vue_vue_type_script_setup_true_lang-O0FWUQU9.js?v=1773287522785";import{u as k}from"./useLoading-CZ2gSAW7.js?v=1773287522785";import{b as V,s as E,c as T}from"./index.vue_vue_type_script_setup_true_lang-CH2GGUxC.js?v=1773287522785";import{k as U,a6 as B,R as H,r as N,e as O,$ as j,Z as q,a0 as a,a9 as o,S as n,j as I,aa as L,_ as D}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{i as M}from"./index-BTglIPU2.js?v=1773287522785";import{a1 as P,a8 as W,au as Y,_ as Z,av as z,a9 as A}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./alarm-C8du74Vj.js?v=1773287522785";import"./alarm-DLi1oY_0.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-B7YvCBmY.js?v=1773287522785";import"./index-BGYvyLDv.js?v=1773287522785";import"./index-DIKmrNCq.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-DgjjuUjT.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-C5hb-Th7.js?v=1773287522785";import"./data-BVsViUMm.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-HxsqzSKU.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-CgKUoL60.js?v=1773287522785";import"./index-K4YGya6V.js?v=1773287522785";import"./index-BRQskX9P.js?v=1773287522785";import"./useTableData-BmkIKQ_R.js?v=1773287522785";import"./useTableColumns-DDeyYvje.js?v=1773287522785";import"./index-S15tYq5l.js?v=1773287522785";import"./copy-D-wIKr0q.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-DeTfbeeM.js?v=1773287522785";import"./index-Cg6fMjw6.js?v=1773287522785";import"./echarts-DiepRh70.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./useSocket-DTHwGZgK.js?v=1773287522785";const F={class:"p-16px"},G={class:"w-250px"},kt=U({__name:"risk-info-form",setup(J,{expose:p}){const u=V(),{capabilitySwitch:c}=B(u),{t:l}=H(),_=N(null),t=O({status:!0,day:1,channel:""}),f={day:{trigger:"input",type:"number",required:!0,message:l("Home.Security.index_58")},method:{trigger:"change",required:!0,message:l("Config.Safe.index_7")}},d=()=>({status:t.status?1:0,day:t.day,channel:t.channel}),g=async()=>{var e;await((e=_.value)==null?void 0:e.validate()),await E(d()),c.value.vul_scan.status=t.status},{loading:y,setLoading:m}=k();return(async()=>{try{m(!0);const{message:e}=await T();M(e)&&(t.status=e.status===1,t.day=e.cycle,t.channel=e.channel)}finally{m(!1)}})(),p({onConfirm:g}),(e,s)=>{const h=W,r=P,v=Z,b=z,S=Y,w=R,x=$,C=A;return j(),q("div",F,[a(C,{show:n(y)},{default:o(()=>[a(x,{ref_key:"formRef",ref:_,model:n(t),rules:f,"label-width":150},{default:o(()=>[a(r,{label:e.$t("Home.Security.index_38")},{default:o(()=>[a(h,{value:n(t).status,"onUpdate:value":s[0]||(s[0]=i=>n(t).status=i)},null,8,["value"])]),_:1},8,["label"]),a(r,{label:e.$t("Waf.Setting.config_49"),path:"day"},{default:o(()=>[a(S,null,{default:o(()=>[a(v,{value:n(t).day,"onUpdate:value":s[1]||(s[1]=i=>n(t).day=i),class:"w-100px",min:0,"show-button":!1,placeholder:""},null,8,["value"]),a(b,{class:"min-w-52px text-center"},{default:o(()=>[I(L(e.$t("Crontab.arrange.index_41")),1)]),_:1})]),_:1})]),_:1},8,["label"]),a(r,{label:e.$t("Config.Safe.index_6"),path:"channel"},{default:o(()=>[D("div",G,[a(w,{value:n(t).channel,"onUpdate:value":s[2]||(s[2]=i=>n(t).channel=i),multiple:!1},null,8,["value"])])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["show"])])}}});export{kt as default};
