import{_ as m,u as y,s as l,p as b,q as f,L as N}from"./index.ab3d776b.js";import{r as s,i as v,k as S,j as t,d as r,S as x,f as i}from"./react.6693569e.js";import{M as T}from"./Header.1d32b19c.js";import"./App.4008d6a0.js";/* empty css              */import{o as L}from"./mobxreact.esm.d8ee88ee.js";import{R as E,l as u,T as n}from"./antd.e57bc55d.js";import"./index.f92af1bb.js";import"./ColorPicker.0ba20714.js";/* empty css              */import"./index.0a6cc9fb.js";/* 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.1d32b19c.js").then(e=>e.c),["Header.1d32b19c.js","Header.bda7ccde.css","index.e016ca71.css","index.9667befb.css","index.8c90b8fe.css","antd.e57bc55d.js","react.6693569e.js","index.f92af1bb.js","index.85e344f4.css","ColorPicker.0ba20714.js","ColorPicker.6d9558b1.css","index.ab3d776b.js","index.7a932fd3.css","index.0a6cc9fb.js","index.c8693bd0.css","App.4008d6a0.js","App.899bd4c5.css","antd.5e666edb.js"],import.meta.url)),I=s.exports.lazy(()=>m(()=>import("./Login.4f29893a.js"),["Login.4f29893a.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","LogoForm.5580ee89.js","LogoForm.ee5a3cab.css","react.6693569e.js","index.ab3d776b.js","index.7a932fd3.css","antd.e57bc55d.js","ColorPicker.0ba20714.js","ColorPicker.6d9558b1.css","index.0a6cc9fb.js","index.c8693bd0.css","size.d81ce6e6.js","Header.1d32b19c.js","Header.bda7ccde.css","index.f92af1bb.js","index.85e344f4.css","App.4008d6a0.js","App.899bd4c5.css","antd.5e666edb.js","dynamicCSS.37df2829.js","mobxreact.esm.d8ee88ee.js","index.3c0c80dc.js","index.760fd386.css","index.67d5a99b.js","index.b82f4e0e.css","RSA.f54b2b0a.js","Cover.fc91526c.js","Cover.25722c5e.css"],import.meta.url)),M=s.exports.lazy(()=>m(()=>import("./SignUp.18dc5575.js"),["SignUp.18dc5575.js","index.ab3d776b.js","index.7a932fd3.css","react.6693569e.js","antd.e57bc55d.js"],import.meta.url)),q=s.exports.lazy(()=>m(()=>import("./LayoutChooser.5845102f.js").then(e=>e.c),["LayoutChooser.5845102f.js","LayoutChooser.aa0da2fa.css","index.e016ca71.css","index.a0cb09a3.css","index.9667befb.css","react.6693569e.js","index.ab3d776b.js","index.7a932fd3.css","antd.e57bc55d.js","LogoForm.5580ee89.js","LogoForm.ee5a3cab.css","index.8c90b8fe.css","ColorPicker.0ba20714.js","ColorPicker.6d9558b1.css","index.0a6cc9fb.js","index.c8693bd0.css","size.d81ce6e6.js","Cover.fc91526c.js","Cover.25722c5e.css","mobxreact.esm.d8ee88ee.js"],import.meta.url));function D(){var c;const{T:e}=y(),g=v(),o=S(),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(x,{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 X=L(D);export{X as default};
