import{_ as C}from"./SbQyJ_vU.js";import z from"./Ca5uvwMn.js";import{_ as S}from"./D57Mp6KB.js";import{f as N,g as $,u as A,h as l,o as s,c as u,m as B,w as c,a as e,n as v,F as I,A as L,q as d,b as n,d as V,T as j,I as T,k as D,t as E}from"./YTYhyFR4.js";import{L as F}from"./xZuKn1jn.js";import"./y_BXiV4o.js";import"./DlAUqK2U.js";const M=e("img",{alt:"logo",class:"w-14 h-14 rounded-lg mx-auto mt-2"},null,-1),q=e("div",{class:"flex items-center justify-center border-b border-gray"},[e("h1",{class:"text-white text-2xl font-semibold text-center mb-4 mt-4"}," App Quinielas ")],-1),O={class:"mt-4"},P={class:"text-bold text-white group-hover:text-white"},Q={class:"py-2 px-6 bg-background flex items-center sticky top-0 left-0 z-20"},R={class:"nav-links ml-auto flex items-center"},U={class:"py-1",role:"none"},G={class:"p-6"},te=N({__name:"admin",setup(H){const{logout:f}=$(),b=A(),t=l(!1),r=l(!1),x=l([{name:"Inicio",link:"/dashboard/admin",icon:"mdi:home",active:"active"},{name:"Pagos",link:"/dashboard/admin/payments",icon:"mdi:cash",active:"active"}]),p=()=>{t.value=!t.value},i=l(!1),h=()=>{i.value=!i.value},y=async()=>{f(),b.push("/auth/login")};return(_,a)=>{const w=C,m=z,g=S;return s(),u("div",null,[r.value?(s(),B(w,{key:0,onClose:a[1]||(a[1]=o=>r.value=!1),title:"Cerrar Sesión",message:"¿Estás seguro de cerrar sesión?"},{default:c(()=>[e("button",{type:"button",class:"inline-flex w-full justify-center rounded-md bg-primary px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500 sm:ml-3 sm:w-auto",onClick:y}," Aceptar "),e("button",{type:"button",class:"bg-red mt-3 inline-flex w-full justify-center rounded-md px-3 py-2 text-sm font-semibold text-white shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto",onClick:a[0]||(a[0]=o=>r.value=!1)}," Cancelar ")]),_:1})):v("",!0),e("aside",{class:d(["fixed left-0 top-0 w-64 h-full bg-background p-4 z-40 sidebar-menu transition-transform border-r border-gray",{"-translate-x-full":!t.value,"translate-x-0":t.value}])},[M,q,e("ul",O,[(s(!0),u(I,null,L(x.value,(o,k)=>(s(),u("li",{class:"mb-1 group",key:k},[n(g,{to:o.link,"exact-active-class":o.active,class:"flex items-center py-2 px-4 text-white hover:bg-gray rounded-md group-hover:bg-gray"},{default:c(()=>[n(m,{name:o.icon,class:"mr-3 text-lg text-white group-hover:text-white",size:"24"},null,8,["name"]),e("span",P,E(o.name),1)]),_:2},1032,["to","exact-active-class"])]))),128))])],2),e("div",{class:d(["fixed top-0 left-0 w-full h-full bg-black/50 z-30 md:hidden transition-opacity duration-500",{"opacity-50":t.value,"opacity-0 pointer-events-none":!t.value}]),onClick:p},null,2),e("main",{class:d(["w-full md:bg-gray-50 min-h-screen transition-all main",{"md:w-full":!t.value,"md:w-[calc(100%-256px)] md:ml-64":t.value}])},[e("div",Q,[e("button",{type:"button",class:"text-white hover:bg-gray rounded-full p-2 hover:text-primary transition-colors",onClick:p},[n(m,{name:"radix-icons:hamburger-menu",size:"24"})]),e("ul",R,[e("li",null,[e("button",{type:"button",class:"text-white hover:bg-gray rounded-full p-2 hover:text-primary transition-colors",onClick:h},[n(m,{name:"radix-icons:avatar",size:"30"})]),n(j,{name:"v"},{default:c(()=>[i.value?(s(),u("div",{key:0,class:d(["absolute right-0 z-10 mt-2 w-56 origin-top-right divide-y divide-gray-100 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",{"pointer-events-none":!i.value}]),role:"menu","aria-orientation":"vertical","aria-labelledby":"menu-button",tabindex:"-1"},[e("div",U,[n(g,{onClick:a[2]||(a[2]=o=>r.value=!0),class:"block px-4 py-2 text-sm text-gray hover:bg-primary cursor-pointer",role:"menuitem",tabindex:"-1",id:"menu-item-2"},{default:c(()=>[V("Cerrar Sesión")]),_:1})])],2)):v("",!0)]),_:1})])])]),e("div",G,[T(_.$slots,"default")])],2),n(D(F),{theme:"dark",position:"top-right"})])}}});export{te as default};
