import{$ as e,O as t,n,t as r}from"./Fade-Bj1YUcWe.js";import{n as i,t as a}from"./Box-BoFhqo9n.js";import{t as o}from"./Button-uK26k-ET.js";import{t as s}from"./Lock-J5y2DEvJ.js";import{l as c,t as l}from"./chunk-KS7C4IRE-C-Go0Sd1.js";import{a as u,f as d,p as f}from"./index-BTWPkaRa.js";var p=e();function m(){let e=c(),{logout:m,isAuthenticated:h}=u();return(0,p.jsx)(r,{in:!0,timeout:400,children:(0,p.jsx)(a,{sx:{minHeight:`100dvh`,display:`flex`,alignItems:`center`,justifyContent:`center`,background:e=>e.palette.gradient.hero,p:{xs:1.5,sm:2}},children:(0,p.jsxs)(i,{elevation:0,sx:{width:`100%`,maxWidth:420,p:{xs:4,sm:5},borderRadius:1,textAlign:`center`,boxShadow:e=>e.palette.mode===`light`?`0 8px 40px ${t(e.palette.primary.main,.12)}`:`0 8px 40px ${t(e.palette.common.black,.3)}`},children:[(0,p.jsx)(a,{sx:{width:72,height:72,borderRadius:`50%`,mx:`auto`,mb:2,display:`flex`,alignItems:`center`,justifyContent:`center`,bgcolor:e=>t(e.palette.error.main,.1),color:`error.main`},children:(0,p.jsx)(s,{sx:{fontSize:36}})}),(0,p.jsx)(n,{variant:`h4`,component:`h1`,sx:{fontWeight:800,mb:1},children:`无权访问`}),(0,p.jsx)(n,{variant:`body1`,color:`text.secondary`,sx:{mb:3},children:`当前账号没有管理后台访问权限。如需管理站点，请使用超级管理员账号登录。`}),(0,p.jsxs)(a,{sx:{display:`flex`,flexDirection:`column`,gap:1.5},children:[(0,p.jsx)(o,{component:l,to:`/`,variant:`contained`,startIcon:(0,p.jsx)(f,{}),fullWidth:!0,sx:{py:1.2,borderRadius:e=>Math.max(8,e.shape.borderRadius-4),fontWeight:700,background:e=>e.palette.gradient.primary},children:`返回博客首页`}),h&&(0,p.jsx)(o,{variant:`outlined`,startIcon:(0,p.jsx)(d,{}),onClick:()=>{m(),e(`/admin/login`,{replace:!0})},fullWidth:!0,sx:{py:1.2,borderRadius:e=>Math.max(8,e.shape.borderRadius-4),fontWeight:600},children:`切换管理员账号`})]})]})})})}export{m as AdminForbidden};