import{r as c,j as e,S as g,x as s}from"./app-C417rstp.js";import{v as j,w as y,e as d}from"./index-C9OncgsG.js";function N({titulo:m}){const[i,o]=c.useState(!1),[b,p]=c.useState(null),x="/images/logos/logo.png",h="DETRI - EPN",t=[{label:"DETRI",children:[{label:"Misión",name:"landing.mision"},{label:"Autoridades",name:"landing.autoridades"},{label:"Docentes",name:"landing.personalDocente"},{label:"Ubicación",name:"landing.ubicacion"}]},{label:"Oferta",children:[{label:"Pregrado",name:"landing.ofertaGrado"},{label:"Posgrado",name:"landing.ofertaPosgrado"}]},{label:"Investigación",children:[{label:"Centros y Laboratorios",name:"landing.centrosLaboratorios"},{label:"Líneas de Investigación",name:"landing.lineasInvestigacion"},{label:"Proyectos",name:"landing.proyectosInvestigacion"},{label:"Publicaciones",name:"landing.publicaciones"}]},{label:"Vida Estudiantil",children:[{label:"Pasantías",name:"landing.pasantias"},{label:"TIC",name:"landing.tic"}]},{label:"Login",name:"login"}];return e.jsxs("header",{className:"bg-primary-700 text-white sticky top-0 z-50 shadow-md",children:[e.jsx(g,{title:m}),e.jsxs("div",{className:"max-w-7xl mx-auto flex items-center justify-between px-6 py-4",children:[e.jsxs(s,{href:route("landing.home"),className:"flex items-center gap-3 hover:opacity-90 transition-opacity","aria-label":"Inicio DETRI",children:[e.jsx("img",{src:x,alt:h,className:"h-9 w-auto object-contain",loading:"eager",decoding:"async"}),"DETRI",e.jsx("span",{className:"text-2xl font-bold tracking-wide"})]}),e.jsx("button",{onClick:()=>o(!i),className:"lg:hidden focus:outline-none","aria-label":"Abrir menú",children:i?e.jsx(j,{size:26}):e.jsx(y,{size:26})}),e.jsx("nav",{className:"hidden lg:flex items-center gap-2 text-sm font-medium",children:t.map((a,n)=>a.children?e.jsxs("div",{className:"relative group",children:[e.jsxs("div",{className:"flex items-center gap-1 px-3 py-2 rounded-md hover:text-primary-200 transition-colors cursor-pointer",children:[e.jsx("span",{children:a.label}),e.jsx(d,{className:"mt-[2px] transition-transform duration-200 group-hover:rotate-180"})]}),e.jsx("div",{className:"invisible opacity-0 group-hover:visible group-hover:opacity-100 transition-all duration-200 ease-out absolute left-0 mt-2 min-w-[220px]",children:e.jsx("div",{className:"bg-white text-gray-800 rounded-xl shadow-lg border border-primary-100 overflow-hidden",children:e.jsx("ul",{className:"py-2",children:a.children.map((l,r)=>e.jsx("li",{children:e.jsx(s,{href:route(l.name),className:"block px-4 py-2 hover:bg-primary-50 hover:text-primary-700 transition-colors",children:l.label})},`${l.label}-${r}`))})})})]},`${a.label}-${n}`):e.jsx(s,{href:route(a.name),className:"px-3 py-2 rounded-md hover:text-primary-200 transition-colors",children:a.label},`${a.label}-${n}`))})]}),i&&e.jsx("nav",{className:"lg:hidden bg-primary-800 text-primary-50 px-6 py-3 border-t border-primary-600",children:e.jsx("ul",{className:"flex flex-col",children:t.map((a,n)=>{const l=b===n;return a.children?e.jsxs("li",{className:"border-b border-primary-700",children:[e.jsxs("button",{className:"w-full flex items-center justify-between py-3 text-left hover:text-primary-200 transition-colors",onClick:()=>p(l?null:n),"aria-expanded":l,children:[e.jsx("span",{children:a.label}),e.jsx(d,{className:`transition-transform duration-200 ${l?"rotate-180":""}`})]}),l&&e.jsx("ul",{className:"pl-3 pb-2",children:a.children.map((r,u)=>e.jsx("li",{children:e.jsx(s,{href:route(r.name),className:"block py-2 text-primary-100 hover:text-white transition-colors",onClick:()=>o(!1),children:r.label})},`${r.label}-${u}`))})]},`${a.label}-${n}`):e.jsx("li",{className:"border-b border-primary-700",children:e.jsx(s,{href:route(a.name),className:"block py-3 hover:text-primary-200 transition-colors",onClick:()=>o(!1),children:a.label})},`${a.label}-${n}`)})})})]})}export{N};
