import{_ as m,u as y,s as l,x as b,y as f,L as N}from"./index.b5b1089a.js";import{r as s,i as v,k as x,j as t,d as r,S,f as i}from"./react.6693569e.js";import{M as T}from"./Header.1aff183e.js";import"./App.b28509be.js";/* empty css              */import{o as L}from"./mobxreact.esm.540cda23.js";import{R as E,q as u,T as n}from"./antd.ef9542dc.js";import"./index.c566a457.js";import"./ColorPicker.ae75796c.js";/* empty css              */import"./index.0a6cc9fb.js";/* empty css              *//* empty css               *//* empty css               */import"./antd.5e666edb.js";const P="_main_1t4qy_1",R="_content_1t4qy_11",V="_tabName_1t4qy_15",a={main:P,content:R,tabName:V},{Header:z,Content:A}=u,C=s.exports.lazy(()=>m(()=>import("./Header.1aff183e.js").then(e=>e.c),["Header.1aff183e.js","Header.bda7ccde.css","index.e016ca71.css","index.9667befb.css","index.8c90b8fe.css","index.dadbf257.css","antd.ef9542dc.js","react.6693569e.js","index.c566a457.js","index.a88d4727.css","ColorPicker.ae75796c.js","ColorPicker.6d9558b1.css","index.b5b1089a.js","index.7a932fd3.css","index.0a6cc9fb.js","index.c8693bd0.css","App.b28509be.js","App.899bd4c5.css","antd.5e666edb.js"],import.meta.url)),I=s.exports.lazy(()=>m(()=>import("./Login.34a52b7b.js"),["Login.34a52b7b.js","Login.f1706c68.css","index.e016ca71.css","index.a0cb09a3.css","index.8c90b8fe.css","index.9667befb.css","index.fa0037a4.css","index.6c507108.css","index.01cda103.css","index.b2705a01.css","index.dadbf257.css","LogoForm.5f199a67.js","LogoForm.ee5a3cab.css","react.6693569e.js","index.b5b1089a.js","index.7a932fd3.css","antd.ef9542dc.js","ColorPicker.ae75796c.js","ColorPicker.6d9558b1.css","index.0a6cc9fb.js","index.c8693bd0.css","size.d81ce6e6.js","Header.1aff183e.js","Header.bda7ccde.css","index.c566a457.js","index.a88d4727.css","App.b28509be.js","App.899bd4c5.css","antd.5e666edb.js","dynamicCSS.b6df29cf.js","mobxreact.esm.540cda23.js","index.fe0a161e.js","index.760fd386.css","index.7550ae32.js","index.b82f4e0e.css","RSA.0dbe6c53.js","Cover.fc91526c.js","Cover.25722c5e.css"],import.meta.url)),M=s.exports.lazy(()=>m(()=>import("./SignUp.8959e453.js"),["SignUp.8959e453.js","index.b5b1089a.js","index.7a932fd3.css","react.6693569e.js","antd.ef9542dc.js"],import.meta.url)),q=s.exports.lazy(()=>m(()=>import("./LayoutChooser.c2bdb7f5.js").then(e=>e.c),["LayoutChooser.c2bdb7f5.js","LayoutChooser.aa0da2fa.css","index.e016ca71.css","index.a0cb09a3.css","index.9667befb.css","react.6693569e.js","index.b5b1089a.js","index.7a932fd3.css","antd.ef9542dc.js","LogoForm.5f199a67.js","LogoForm.ee5a3cab.css","index.8c90b8fe.css","ColorPicker.ae75796c.js","ColorPicker.6d9558b1.css","index.0a6cc9fb.js","index.c8693bd0.css","size.d81ce6e6.js","Cover.fc91526c.js","Cover.25722c5e.css","mobxreact.esm.540cda23.js"],import.meta.url));function D(){var c;const{T:e}=y(),g=v(),o=x(),h={header:[{type:"image",props:{src:{mode:"normal",value:"@icon:Gapper"}}},{type:"flex"},{type:"to-layout-chooser"},{type:"avatar",props:{logoutUrl:"",name:e("settings.avatarName"),actions:[]}}]},_=s.exports.useMemo(()=>{switch(o.params.type){case"login":return o.params.type;case"signup":return o.params.type;case"layout-choose":return o.params.type;default:return"main"}},[o.params]),p=(c=l.settingsStore.main.default)==null?void 0:c.colors;return s.exports.useEffect(()=>{p&&b(f({...p}))},[p]),l.authStore.session.isAdmin?r(u,{className:"g--layout",children:[t(z,{children:t(T,{layout:h})}),t(A,{children:r("div",{className:a.main,children:[r(n,{activeKey:_,onChange:d=>g.push(`/settings/${d}`),centered:!0,children:[t(n.TabPane,{tab:t("span",{className:a.tabName,children:e("settings.title.main")})},"main"),t(n.TabPane,{tab:t("span",{className:a.tabName,children:e("settings.title.login")})},"login"),t(n.TabPane,{tab:t("span",{className:a.tabName,children:e("settings.title.layoutChoose")})},"layout-choose"),t(n.TabPane,{tab:t("span",{className:a.tabName,children:e("settings.title.signup")})},"signup")]}),t("div",{className:a.content,children:t(s.exports.Suspense,{fallback:t(N,{}),children:r(S,{children:[t(i,{path:"/settings/login",component:I}),t(i,{path:"/settings/signup",component:M}),t(i,{path:"/settings/layout-choose",component:q}),t(i,{path:["/settings/main","/settings"],component:C})]})})})]})})]}):t(E,{status:"403",title:e("settings.error.403")})}const Y=L(D);export{Y as default};
