PageSourceSearch

https://zoo-event.com/assets/AdminLayout-_jCqSojv.js

js zoo-event.com collected 2026-10-06 12:11:12 UTC 8,483 bytes, 31 lines download raw bytes

1import{c as i,r as l,j as e,O as f,x as o,z as y,aH as w,X as A,T as b,G as j,R as O,aI as S,y as M,aG as C,h as L,aj as z,B as u,aJ as E,aK as V,g as R,s as B,U as T,aL as D,aM as I,aN as P,aO as Z,aP as p,aQ as H,L as q,w as G}from"./index-DkA-dTfL.js";import{N as K}from"./newspaper-C1KNohxY.js";import{E as U}from"./external-link-BwSfgFLo.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const F=i("AtSign",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const J=i("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
12 * @license lucide-react v0.462.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */const Q=i("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
17 * @license lucide-react v0.462.0 - ISC
18 *
19 * This source code is licensed under the ISC license.
20 * See the LICENSE file in the root directory of this source tree.
21 */const W=i("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
22 * @license lucide-react v0.462.0 - ISC
23 *
24 * This source code is licensed under the ISC license.
25 * See the LICENSE file in the root directory of this source tree.
26 */const X=i("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
27 * @license lucide-react v0.462.0 - ISC
28 *
29 * This source code is licensed under the ISC license.
30 * See the LICENSE file in the root directory of this source tree.
31 */const Y=i("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),_=O,$=S,ee=M,v=l.forwardRef(({className:a,...t},s)=>e.jsx(f,{className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...t,ref:s}));v.displayName=f.displayName;const ae=C("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),k=l.forwardRef(({side:a="right",className:t,children:s,...n},r)=>e.jsxs(ee,{children:[e.jsx(v,{}),e.jsxs(y,{ref:r,className:o(ae({side:a}),t),...n,children:[s,e.jsxs(w,{className:"absolute right-4 top-4 roun
31ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[e.jsx(A,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));k.displayName=y.displayName;const se=l.forwardRef(({className:a,...t},s)=>e.jsx(b,{ref:s,className:o("text-lg font-semibold text-foreground",a),...t}));se.displayName=b.displayName;const te=l.forwardRef(({className:a,...t},s)=>e.jsx(j,{ref:s,className:o("text-sm text-muted-foreground",a),...t}));te.displayName=j.displayName;const ne=[{to:"/admin",label:"Dashboard",icon:X,end:!0,superAdminOnly:!1},{to:"/admin/anfragen/planer",label:"Event-Planer",icon:R,superAdminOnly:!1},{to:"/admin/anfragen/kontakt",label:"Kontaktanfragen",icon:B,superAdminOnly:!1},{to:"/admin/locations",label:"Locations",icon:Q,superAdminOnly:!0},{to:"/admin/blog",label:"Blog",icon:J,superAdminOnly:!0},{to:"/admin/presse",label:"Presse",icon:K,superAdminOnly:!0},{to:"/admin/emails",label:"E-Mail-Empfänger",icon:F,superAdminOnly:!0},{to:"/admin/admins",label:"Admins",icon:T,superAdminOnly:!0}],re=({viewAs:a,setViewAs:t,className:s})=>e.jsxs(D,{value:a??"admin",onValueChange:n=>t(n==="admin"?null:n),children:[e.jsxs(I,{className:o("h-9 text-sm",s),"aria-label":"Anzeigen als",children:[e.jsx(W,{className:"w-4 h-4 mr-2 shrink-0 text-muted-foreground"}),e.jsx(P,{})]}),e.jsxs(Z,{children:[e.jsx(p,{value:"admin",children:"Anzeigen als: Super Admin"}),e.jsx(p,{value:"editor",children:"Anzeigen als: Content Admin"})]})]}),g=({onNavigate:a,onLogout:t,items:s,roleLabel:n})=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"p-6 border-b border-border",children:[e.jsx("div",{className:"font-baskervville text-xl text-foreground",children:"ZOO Event"}),e.jsx("div",{className:"text-xs text-muted-foreground uppercase tracking-wide",children:n})]}),e.jsx("nav",{className:"flex-1 p-3 space-y-1 overflow-y-auto",children:s.map(({to:r,label:d,icon:h,end:c})=>e.jsxs(H,{to:r,end:c,onClick:a,className:({isActive:m})=>o("flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors",m?"bg-primary/10 text-primary font-medium":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[e.jsx(h,{className:"w-4 h-4"}),d]},r))}),e.jsxs("div",{className:"p-3 border-t border-border space-y-1",children:[e.jsx(u,{asChild:!0,variant:"ghost",className:"w-full justify-start",onClick:a,children:e.jsxs(q,{to:"/",children:[e.jsx(U,{className:"w-4 h-4 mr-2"}),"Zurück zur Website"]})}),e.jsxs(u,{variant:"ghost",className:"w-full justify-start",onClick:t,children:[e.jsx(Y,{className:"w-4 h-4 mr-2"}),"Abmelden"]})]})]}),de=()=>{const a=L(),[t,s]=l.useState(!1),{isSuperAdmin:n,effectiveRole:r,viewAs:d,setViewAs:h}=z(),c=ne.filter(N=>!N.superAdminOnly||r==="admin"),m=r==="admin"?"Super Admin":"Content Admin",x=async()=>{await G.auth.signOut(),a("/admin/login",{replace:!0})};return e.jsxs("div",{className:"min-h-screen bg-muted/30",children:[e.jsx("aside",{className:"hidden lg:flex fixed inset-y-0 left-0 w-60 bg-background border-r border-border flex-col",children:e.jsx(g,{onLogout:x,items:c,roleLabel:m})}),e.jsxs("header",{className:"lg:hidden sticky top-0 z-40 flex items-center justify-between gap-3 h-14 px-4 bg-background border-b border-border",children:[e.jsxs(_,{open:t,onOpenChange:s,children:[e.jsx($,{asChild:!0,children:e.jsx(u,{variant:"ghost",size:"icon","aria-label":"Menü öffnen",children:e.jsx(E,{className:"w-5 h-5"})})}),e.jsx(k,{side:"left",className:"w-72 p-0 flex flex-col",children:e.jsx(g,{onNavigate:()=>s(!1),onLogout:x,items:c,roleLabel:m})})]}),e.jsx("div",{className:"font-baskervville text-lg text-foreground",children:"ZOO Event Admin"}),e.jsx("div",{className:"w-9"})]}),e.jsxs("div",{className:"lg:ml-60",children:[n&&e.jsxs("div",{className:"border-b border-border bg-background px-4 sm:px-6 lg:px-8 py-2 flex flex-col sm:flex-row sm:items-center gap-2 sm:justify-between",children:[d?e.jsx("p",{className:"text-xs text-primary",children:"Vorschau-Modus: Sie sehen den Admin-Bereich als Content Admin. Ihre echten Rechte bleiben unverändert."}):e.jsx("p",{className:"text-xs text-muted-foreground",children:"Angemeldet als Super Admin"}
31),e.jsx(re,{viewAs:d,setViewAs:h,className:"w-full sm:w-64"})]}),e.jsx("main",{className:"p-4 sm:p-6 lg:p-8",children:e.jsx(V,{})})]})]})};export{de as AdminLayout};

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.