import{_ as W}from"./index-DIKmrNCq.js?v=1773287522785";import{_ as h}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{H as k}from"./setting-DouXuJGW.js?v=1773287522785";import{k as C,R,r as B,e as E,$ as N,Z as U,a0 as e,a9 as o,S as i,_ as a,aa as f,N as x}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{a1 as V,a8 as D,_ as H}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./index-BTglIPU2.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";const I={class:"p-20px"},Z={class:"w-150px"},j={class:"w-150px"},M=C({__name:"config",props:{config:{}},emits:["refresh"],setup(m,{expose:u,emit:g}){const d=m,v=g,{t:_}=R(),c=B(null),n=E({open:!0,cycle:60,limit:240}),S={cycle:{validator:()=>n.cycle?!0:new Error(_("Waf.Setting.config_154"))},limit:{validator:()=>n.limit?!0:new Error(_("Waf.Setting.config_155"))}},b=async()=>{var t;await((t=c.value)==null?void 0:t.validate()),await k({...x(n),open:n.open?1:0}),v("refresh")};return(()=>{const{config:t}=d;n.open=t.open,n.limit=t.limit,n.cycle=t.cycle})(),u({onConfirm:b}),(t,l)=>{const w=D,r=V,p=H,y=h,$=W;return N(),U("div",I,[e(y,{ref_key:"formRef",ref:c,model:i(n),rules:S},{default:o(()=>[e(r,{label:t.$t("Waf.Setting.config_148"),path:"open"},{default:o(()=>[e(w,{value:i(n).open,"onUpdate:value":l[0]||(l[0]=s=>i(n).open=s)},null,8,["value"])]),_:1},8,["label"]),e(r,{label:t.$t("Waf.Setting.config_149"),path:"cycle"},{default:o(()=>[a("div",Z,[e(p,{value:i(n).cycle,"onUpdate:value":l[1]||(l[1]=s=>i(n).cycle=s),min:1,"show-button":!1},{suffix:o(()=>[a("span",null,f(t.$t("Waf.Setting.config_53")),1)]),_:1},8,["value"])])]),_:1},8,["label"]),e(r,{label:t.$t("Waf.Setting.config_150"),path:"limit"},{default:o(()=>[a("div",j,[e(p,{value:i(n).limit,"onUpdate:value":l[2]||(l[2]=s=>i(n).limit=s),min:1,"show-button":!1},{suffix:o(()=>[a("span",null,f(t.$t("Waf.Setting.config_52")),1)]),_:1},8,["value"])])]),_:1},8,["label"])]),_:1},8,["model"]),e($,{class:"mt-12px"},{default:o(()=>[a("li",null,f(t.$t("Waf.Setting.config_151")),1),a("li",null,f(t.$t("Waf.Setting.config_152")),1),a("li",null,f(t.$t("Waf.Setting.config_153")),1)]),_:1})])}}});export{M as default};
