import{_ as e}from"./public.js?v=1763625242172";import{_ as t}from"./index.vue_vue_type_script_setup_true_lang.js?v=1763625242172";import{H as a}from"./setting.js?v=1763625242172";import{k as l,P as i,r as n,e as o,R as s,S as f,X as c,a3 as r,V as p,U as u,a4 as m,N as _}from"./vue.js?v=1763625242172";import{dj as g,dP as d,df as v}from"./naive.js?v=1763625242172";import"./page_layout.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";const y={class:"p-20px"},S={class:"w-150px"},j={class:"w-150px"},W=l({__name:"config",props:{config:{}},emits:["refresh"],setup(l,{expose:W,emit:b}){const x=l,w=b,{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})(),W({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=d,o=v,_=t,W=e;return s(),f("div",y,[c(_,{ref_key:"formRef",ref:h,model:p(U),rules:k},{default:r((()=>[c(n,{label:a.$t("Waf.Setting.config_148"),path:"open"},{default:r((()=>[c(i,{value:p(U).open,"onUpdate:value":l[0]||(l[0]=e=>p(U).open=e)},null,8,["value"])])),_:1},8,["label"]),c(n,{label:a.$t("Waf.Setting.config_149"),path:"cycle"},{default:r((()=>[u("div",S,[c(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"]),c(n,{label:a.$t("Waf.Setting.config_150"),path:"limit"},{default:r((()=>[u("div",j,[c(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"]),c(W,{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{W as default};
