import{_ as e}from"./public.js?v=1753954525509";import{_ as t}from"./index.vue_vue_type_script_setup_true_lang.js?v=1753954525509";import{H as a}from"./setting.js?v=1753954525509";import{k as l,P as i,r as n,e as o,U as s,V as c,Q as f,a2 as r,X as p,W as u,a3 as m,N as _}from"./vue.js?v=1753954525509";import{c5 as g,cA as v,c1 as d}from"./naive.js?v=1753954525509";import"./page_layout.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";const y={class:"p-20px"},W={class:"w-150px"},S={class:"w-150px"},b=l({__name:"config",props:{config:{}},emits:["refresh"],setup(l,{expose:b,emit:j}){const x=l,w=j,{t:$}=i(),h=n(null),U=o({open:!0,cycle:60,limit:240}),k={cycle:{validator:()=>!!U.cycle||new Error($("Waf.Setting.config_154"))},limit:{validator:()=>!!U.limit||new Error($("Waf.Setting.config_155"))}};return(()=>{const{config:e}=x;U.open=e.open,U.limit=e.limit,U.cycle=e.cycle})(),b({onConfirm:async()=>{var e;await(null==(e=h.value)?void 0:e.validate()),await a({..._(U),open:U.open?1:0}),w("refresh")}}),(a,l)=>{const i=g,n=v,o=d,_=t,b=e;return s(),c("div",y,[f(_,{ref_key:"formRef",ref:h,model:p(U),rules:k},{default:r((()=>[f(n,{label:a.$t("Waf.Setting.config_148"),path:"open"},{default:r((()=>[f(i,{value:p(U).open,"onUpdate:value":l[0]||(l[0]=e=>p(U).open=e)},null,8,["value"])])),_:1},8,["label"]),f(n,{label:a.$t("Waf.Setting.config_149"),path:"cycle"},{default:r((()=>[u("div",W,[f(o,{value:p(U).cycle,"onUpdate:value":l[1]||(l[1]=e=>p(U).cycle=e),min:1,"show-button":!1},{suffix:r((()=>[u("span",null,m(a.$t("Waf.Setting.config_53")),1)])),_:1},8,["value"])])])),_:1},8,["label"]),f(n,{label:a.$t("Waf.Setting.config_150"),path:"limit"},{default:r((()=>[u("div",S,[f(o,{value:p(U).limit,"onUpdate:value":l[2]||(l[2]=e=>p(U).limit=e),min:1,"show-button":!1},{suffix:r((()=>[u("span",null,m(a.$t("Waf.Setting.config_52")),1)])),_:1},8,["value"])])])),_:1},8,["label"])])),_:1},8,["model"]),f(b,{class:"mt-12px"},{default:r((()=>[u("li",null,m(a.$t("Waf.Setting.config_151")),1),u("li",null,m(a.$t("Waf.Setting.config_152")),1),u("li",null,m(a.$t("Waf.Setting.config_153")),1)])),_:1})])}}});export{b as default};
