1import{K as c,r as a,j as e,$ as d}from"./app-C-97Z-Yz.js";import{S as n}from"./SelectableButton-CLLHfxH_.js";import{P as x}from"./PrimaryGreenButton-BDfNJQgR.js";import{L as p}from"./DefaultLayout-DPro-YVe.js";import m from"./EventCard-CyYh8Gbl.js";import"./index-DHtGP0-q.js";import"./floating-ui.react-dom-aoSgedeH.js";import"./index-Co5otJ4c.js";import"./iconBase-BioTjfel.js";import"./sweetalert2.esm.all-B0Dix5B2.js";import"./SunIcon-DBg6x8-A.js";import"./DeleteButton-DzQ7wtq7.js";import"./ShareButton-DyR2sts-.js";import"./Modal-D4i4BMkE.js";import"./transition-CQ6Gw0VV.js";import"./ReservationForm-Ckq84DnB.js";import"./Card-DkEddh48.js";import"./es-DfN3vIXC.js";function G({events:r,pastEvents:l}){const i=c().props.auth.user,[o,t]=a.useState("");return a.useEffect(()=>{r.length>0?t("events"):l.length>0?t("pastEvents"):t("events")},[]),e.jsx(p,{children:e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:"mt-5 grid grid-cols-2 gap-2",children:[e.jsx(n,{onClick:()=>t("events"),selected:o==="events",children:"Eventos Proximos"}),e.jsx(n,{onClick:()=>t("pastEvents"),selected:o==="pastEvents",children:"Eventos Pasados"})]}),i!=null&&i.roles.includes("admin")?e.jsx("div",{className:"my-5 flex w-full flex-wrap justify-center gap-4 px-2",children:e.jsx(d,{href:route("events.create"),children:e.jsx(x,{children:"Crear Nuevo Evento"})})}):"",o==="events"?e.jsxs("div",{children:[e.jsx("h1",{className:"w-full mb-5 mt-5 text-center text-xl text-gray-900 dark:text-white",children:r.length?"Proximmos Eventos":"No hay eventos"}),r.length?e.jsx("div",{className:"mb-5 flex w-full flex-wrap justify-center gap-4 sm:grid sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-3",children:r.map(s=>e.jsx(m,{event:s},s.id))}):""]}):e.jsxs("div",{children:[e.jsx("h1",{className:"w-full mb-5 mt-5 text-center text-xl text-gray-900 dark:text-white",children:l.length?"Eventos pasados":"No hay eventos pasados"}),l.length?e.jsx("div",{className:"mb-5 flex w-full flex-wrap justify-center space-y-4 sm:grid sm:grid-cols-2 sm:gap-4 xl:grid-cols-3 2xl:grid-cols-3",children:l.map(s=>e.jsx(m,{event:s},s.id))}):""]})]})})}export{G as default};
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.