1import{u as e,j as a}from"./index-B-01gp8C.js";import{X as s,d as l,an as t,C as r,al as o,ao as c,ap as n,N as i,M as d,ak as x,aq as m,S as g,ar as h,z as p}from"./vendor-ui-DJKmmfZX.js";import{c as b,r as j,i as f,O as N}from"./vendor-react-7UJKJIhU.js";import"./vendor-supabase-CDTnsVBO.js";const u="sprava-7k9m2x5p8q",v=`/${u}/login`;function w(){const{signOut:w,adminUser:y}=e(),k=b(),[$,z]=j.useState(!1),S=[{to:`/${u}`,icon:t,label:"Dashboard",end:!0},{to:`/${u}/reservations`,icon:r,label:"Rezervace"},{to:`/${u}/menu`,icon:o,label:"Menu"},{to:`/${u}/specialties`,icon:c,label:"Speciality"},{to:`/${u}/gallery`,icon:n,label:"Galerie"},{to:`/${u}/news`,icon:i,label:"Aktuality"},{to:`/${u}/newsletter`,icon:d,label:"Newsletter"},{to:`/${u}/discount-codes`,icon:x,label:"Slevy"}];return a.jsxs("div",{className:"min-h-screen bg-cream flex font-inter",children:[a.jsx("button",{onClick:()=>z(!$),className:"lg:hidden fixed top-4 left-4 z-50 p-3 bg-cream text-charcoal rounded-lg shadow-2xl border-2 border-gold hover:bg-gold hover:text-charcoal transition-all",children:$?a.jsx(s,{className:"w-6 h-6"}):a.jsx(l,{className:"w-6 h-6"})}),$&&a.jsx("div",{className:"lg:hidden fixed inset-0 bg-black/50 z-40",onClick:()=>z(!1)}),a.jsxs("aside",{className:`\n w-72 bg-charcoal border-r border-gold/10 flex flex-col\n fixed lg:static inset-y-0 left-0 z-40\n transform transition-transform duration-300 ease-in-out\n ${$?"translate-x-0":"-translate-x-full lg:translate-x-0"}\n `,children:[a.jsxs("div",{className:"p-4 lg:p-8 border-b border-gold/10",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[a.jsx("div",{className:"w-px h-8 bg-gold"}),a.jsx("h1",{className:"text-xl lg:text-2xl font-playfair font-bold text-cream",children:"Hostinec Stoletá"})]}),a.jsx("p",{className:"text-cream/60 text-sm font-cormorant ml-11",children:"Administrace"})]}),a.jsxs("nav",{className:"flex-1 p-4 lg:p-6 overflow-y-auto",children:[a.jsx("ul",{className:"space-y-2",children:S.map(e=>a.jsx("li",{children:a.jsxs(f,{to:e.to,end:e.end,onClick:()=>z(!1),className:({isActive:e})=>"flex items-center gap-3 px-4 py-3 rounded-sm transition-all duration-200 "+(e?"bg-gold text-charcoal font-medium lg:bg-gold lg:text-charcoal":"text-cream/80 hover:text-gold hover:bg-charcoal-light lg:text-cream/80 lg:hover:text-gold lg:hover:bg-charcoal-light bg-white lg:bg-transparent text-charcoal lg:text-cream/80"),children:[a.jsx(e.icon,{className:"w-5 h-5"}),a.jsx("span",{className:"text-sm tracking-wide",children:e.label})]})},e.to))}),a.jsx("div",{className:"mt-8 pt-8 border-t border-gold/10",children:a.jsxs("a",{href:"/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 px-4 py-3 rounded-sm transition-all duration-200 bg-white lg:bg-transparent text-charcoal lg:text-cream/80 hover:text-gold hover:bg-gray-100 lg:hover:bg-charcoal-light",children:[a.jsx(m,{className:"w-5 h-5"}),a.jsx("span",{className:"text-sm tracking-wide",children:"Zobrazit web"})]})})]}),a.jsxs("div",{className:"p-4 lg:p-6 border-t border-gold/10 space-y-3",children:[y&&a.jsxs("div",{className:"px-4 py-3 bg-charcoal-light rounded-sm border border-gold/10",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(g,{className:"w-4 h-4 text-gold"}),a.jsx("span",{className:"text-xs text-cream/60 uppercase tracking-wider",children:"PÅihlášen jako"})]}),a.jsx("p",{className:"text-sm text-cream font-medium truncate",children:y.email}),a.jsxs("div",{className:"mt-2 inline-flex items-center gap-1.5 px-2 py-0.5 bg-gold/20 rounded text-xs text-gold font-medium",children:["super_admin"===y.role&&"Super Admin","admin"===y.role&&"Administrátor","editor"===y.role&&"Editor"]})]}),a.jsxs("button",{onClick:async()=>{try{await w(),p.success("Odhlášenà úspÄÅ¡né"),k(v)}catch(e){p.error("Chyba pÅi odhlášenÃ")}},className:"flex items-center gap-3 px-4 py-3 rounded-sm transition-all duration-200 w-full bg-white lg:bg-transparent text-charcoal lg:text-cream/80 hover:text-gold hover:bg-gray-100 lg:hover:bg-charcoal-light",children:[a.jsx(h,{className:"w-5 h-5"}),a.jsx("span",{className:"text-sm tracking-wide",children:"Odhlásit se"})]})]})]}),a.jsxs("main",{className:"flex-1 overflow-y-auto bg-cream lg:ml-0",children:[a.jsxs("div",{className:"lg:hidden sticky top-0 z-30 bg-charcoal border-b border-gold/10 px-4 py-4 pl-20",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-px h-6 bg-gold"}),a.jsx("h1",{className:"text-lg font-playfair font-bold text-cream",children:"Hostinec
1Stoletá"})]}),a.jsx("p",{className:"text-cream/60 text-xs font-cormorant ml-8",children:"Administrace"})]}),a.jsx(N,{})]})]})}export{w 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.