import{_ as y,u as N,h as s,R as w,m as v,S as k,n as x,k as p,o as d,c as m,d as C,s as A,a,t as E,l as f,a0 as R,p as S,af as z,Q as B}from"./D-M-66OV.js";const D={key:0,class:"down-for-maintenance"},I={class:"content"},M={__name:"admin",setup(O){var c;const{$ss:n,$cmsUser:t}=N(),{query:_}=s(),i=w(!1),{getCssVars:g}=z(),e=(c=n==null?void 0:n.general)==null?void 0:c.favicon;return v({link:[{rel:"stylesheet",href:"https://fonts.googleapis.com/css?family=Raleway:300,300i,400,400i,500,500i,700,700i"},{rel:"icon",type:"image/x-icon",href:e},{rel:"apple-touch-icon",size:"180x180",href:e+"?w=180&h=180&fm=png"},{rel:"icon",type:"image/png",size:"32x32",href:e+"?w=32&h=32&fm=png"},{rel:"icon",type:"image/png",size:"16x16",href:e+"?w=16&h=16&fm=png"}]}),k(async()=>{await t.init(!0),console.log("path",s().path),!t.isLoggedIn()&&_.cmsUserBearerToken&&s().path!=="/admin/logout"&&(console.log("no access to site, show logout"),x("/admin/logout")),i.value=!0}),(o,l)=>{const h=B;return p(i)?(d(),m("div",{key:0,ref:"main",class:"admin-layout",style:S(p(g)())},[C(h,null,{default:A(()=>{var r,u;return[(r=o.$config.public)!=null&&r.DOWN_FOR_MAINTENANCE?(d(),m("div",D,[a("div",I,[l[0]||(l[0]=a("h1",null,"Admin Down For Maintenance",-1)),a("div",null,E((u=o.$config.public)==null?void 0:u.DOWN_FOR_MAINTENANCE),1)])])):f("",!0),R(o.$slots,"default",{},void 0,!0)]}),_:3})],4)):f("",!0)}}},V=y(M,[["__scopeId","data-v-d5bd4cc9"]]);export{V as default};