1import{u as l,o as m,g as c,p as d,j as e,L as x,O as p,a as u}from"./index-CHfAEzh6.js";import{u as b}from"./useQuery-BNbnznBU.js";import{L as i}from"./log-out-BGR8mbb7.js";import"./useBaseQuery-Bttx1P4P.js";const f=[{to:"/admin/shows",label:"Shows"},{to:"/admin/testimonials",label:"Testimonials"},{to:"/admin/blog",label:"Blog"},{to:"/admin/categories",label:"Kategorien"},{to:"/admin/comments",label:"Kommentare"},{to:"/admin/analytics",label:"Analytics"}];function y(){const r=l(),s=m(),o=c(d),a=b({queryKey:["isAdmin"],queryFn:()=>o()});async function n(){await s.cancelQueries(),s.clear(),await u.auth.signOut(),r({to:"/auth",replace:!0})}return a.isLoading?e.jsx("div",{className:"flex min-h-[60vh] items-center justify-center px-6",children:"Ladeâ¦"}):a.data?.isAdmin?e.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-10 lg:px-10",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 border-b-2 border-plum/30 pb-4",children:[e.jsx("div",{className:"flex flex-wrap gap-1",children:f.map(t=>e.jsx(x,{to:t.to,activeProps:{className:"bg-plum-soft text-aubergine-deep"},className:"border-2 border-plum/40 px-4 py-2 text-[11px] font-bold uppercase tracking-widest text-bone/70 hover:border-plum-soft hover:text-bone",children:t.label},t.to))}),e.jsxs("button",{onClick:n,className:"inline-flex items-center gap-2 border-2 border-plum/40 px-4 py-2 text-[11px] font-bold uppercase tracking-widest text-bone/70 hover:bg-plum-soft hover:text-aubergine-deep",children:[e.jsx(i,{className:"h-3 w-3"})," Logout"]})]}),e.jsx("div",{className:"mt-6",children:e.jsx(p,{})})]}):e.jsx("div",{className:"flex min-h-[60vh] items-center justify-center px-6",children:e.jsxs("div",{className:"max-w-md text-center",children:[e.jsx("p",{className:"font-display text-3xl font-extrabold uppercase",children:"Kein Admin-Zugriff"}),e.jsx("p",{className:"mt-4 text-sm text-muted-foreground",children:"Dein Konto hat keine Admin-Rolle."}),e.jsxs("button",{onClick:n,className:"mt-8 inline-flex items-center gap-2 border-2 border-ink px-5 py-2 text-xs uppercase tracking-widest",children:[e.jsx(i,{className:"h-3 w-3"})," Ausloggen"]})]})})}export{y as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.