import{e as t,E as g}from"./request-14d7fed5.js";import{r as p,cc as d}from"./index-25eb6331.js";const S=()=>t({url:"/admin/config",method:"get"}),w=e=>t({url:"/admin/config/site",method:"put",data:e}),y=()=>t({url:"/admin/serverAddress",method:"get",config:{showDefaultMsg:!1}}),D=()=>t({url:"/admin/headers",method:"get",config:{showDefaultMsg:!1}}),L=e=>t({url:"/admin/config/view",method:"put",data:e}),M=()=>t({url:"/admin/clientIp",method:"get",config:{showDefaultMsg:!1}}),k=e=>t({url:"/admin/rule-test",method:"post",data:e}),A=e=>t({url:"/admin/link/limit/info",method:"get",data:e}),I=e=>t({url:"/admin/config/link",method:"put",data:e}),b=e=>t({url:"/admin/config/security",method:"put",data:e}),x=e=>t({url:"/admin/config/access",method:"put",data:e}),C=()=>t({url:"/admin/log/download",method:"get",config:{responseType:"blob",showDefaultMsg:!1,responseIntercept:!1}});function E(e,i){const n=p(null),{loading:c,refresh:m}=d(S,{cacheKey:"siteSetting",onSuccess(o){n.value=o.data}}),{loading:f,run:l}=d(e,{manual:!0,onSuccess(){g({message:"保存成功",type:"success"})}});return{siteSetting:n,siteSettingLoading:c,siteSettingReload:m,saveData:o=>{i&&i.value?i.value.validate((h,s)=>{if(h)l(n.value);else if(o===!0)for(let r in s){let u="";for(let a=0;a<s[r].length;a++)u+=s[r][a].message,a<s[r].length-1&&(u+=", ");g.warning(u)}}):l(n.value)},saveLoading:f}}export{b as a,I as b,x as c,M as d,L as e,w as f,A as g,y as h,D as i,C as j,S as l,k as t,E as u};
