import{x as w,f as C,y as D,z as E,e as g,a as t,i as N,t as b,b as n,w as r,d as s,n as u,u as o,l as i,g as v,A as p,o as y}from"./app-iLLm8RtX.js";const z={class:"bg-white shadow mb-6"},A={class:"px-6 py-4"},S={class:"flex justify-between items-center"},V={class:"text-2xl font-bold text-gray-900"},B={key:0,class:"text-gray-600"},L={class:"flex items-center space-x-1"},M={class:"relative"},P={class:"absolute left-0 mt-1 w-48 bg-white rounded-md shadow-lg z-50 border"},_={class:"relative"},$={class:"absolute left-0 mt-1 w-48 bg-white rounded-md shadow-lg z-50 border"},O={__name:"AdminNavigation",props:{title:String,subtitle:String},setup(f){const k=w(),l=C(null),a=m=>{const e=k.url;return m==="/admin"?e==="/admin"||e==="/admin/":e.startsWith(m)},c=m=>{l.value=l.value===m?null:m},d=()=>{l.value=null},x=m=>{m.target.closest(".relative")||d()};return D(()=>{document.addEventListener("click",x)}),E(()=>{document.removeEventListener("click",x)}),(m,e)=>(y(),g("div",z,[t("div",A,[t("div",S,[t("div",null,[t("h1",V,b(f.title),1),f.subtitle?(y(),g("p",B,b(f.subtitle),1)):N("",!0)]),t("nav",L,[n(o(i),{href:"/admin",class:u([a("/admin")&&!a("/admin/enrollments")?"bg-blue-100 text-blue-800":"text-gray-700 hover:bg-gray-100","px-3 py-2 rounded-md text-sm font-medium flex items-center"])},{default:r(()=>[...e[2]||(e[2]=[t("i",{class:"fas fa-tachometer-alt mr-1"},null,-1),s("Dashboard ",-1)])]),_:1},8,["class"]),t("div",M,[t("button",{onClick:e[0]||(e[0]=h=>c("enrollments")),class:u([[a("/admin/enrollments")||a("/admin/certificates")||a("/admin/manual-certificates")?"bg-blue-100 text-blue-800":"text-gray-700 hover:bg-gray-100",l.value==="enrollments"?"bg-gray-100":""],"px-3 py-2 rounded-md text-sm font-medium flex items-center"])},[e[3]||(e[3]=t("i",{class:"fas fa-graduation-cap mr-1"},null,-1)),e[4]||(e[4]=s("Enrollments ",-1)),t("i",{class:u([l.value==="enrollments"?"fa-chevron-up":"fa-chevron-down","fas ml-1 text-xs"])},null,2)],2),v(t("div",P,[n(o(i),{href:"/admin/enrollments",onClick:d,class:"block px-4 py-2 text-sm text-gray-700 hover:bg-blue-50"},{default:r(()=>[...e[5]||(e[5]=[t("i",{class:"fas fa-list mr-2"},null,-1),s("All Enrollments ",-1)])]),_:1}),n(o(i),{href:"/admin/certificates",onClick:d,class:"block px-4 py-2 text-sm text-gray-700 hover:bg-blue-50"},{default:r(()=>[...e[6]||(e[6]=[t("i",{class:"fas fa-certificate mr-2"},null,-1),s("Certificates ",-1)])]),_:1}),n(o(i),{href:"/admin/manual-certificates",onClick:d,class:"block px-4 py-2 text-sm text-gray-700 hover:bg-blue-50"},{default:r(()=>[...e[7]||(e[7]=[t("i",{class:"fas fa-upload mr-2"},null,-1),s("Manual Records ",-1)])]),_:1})],512),[[p,l.value==="enrollments"]])]),t("div",_,[t("button",{onClick:e[1]||(e[1]=h=>c("management")),class:u([[a("/admin/courses")||a("/admin/partners")||a("/admin/centers")||a("/admin/credits")?"bg-blue-100 text-blue-800":"text-gray-700 hover:bg-gray-100",l.value==="management"?"bg-gray-100":""],"px-3 py-2 rounded-md text-sm font-medium flex items-center"])},[e[8]||(e[8]=t("i",{class:"fas fa-cogs mr-1"},null,-1)),e[9]||(e[9]=s("Management ",-1)),t("i",{class:u([l.value==="management"?"fa-chevron-up":"fa-chevron-down","fas ml-1 text-xs"])},null,2)],2),v(t("div",$,[n(o(i),{href:"/admin/courses/index",onClick:d,class:"block px-4 py-2 text-sm text-gray-700 hover:bg-blue-50"},{default:r(()=>[...e[10]||(e[10]=[t("i",{class:"fas fa-book mr-2"},null,-1),s("Courses ",-1)])]),_:1}),n(o(i),{href:"/admin/partners/index",onClick:d,class:"block px-4 py-2 text-sm text-gray-700 hover:bg-blue-50"},{default:r(()=>[...e[11]||(e[11]=[t("i",{class:"fas fa-user-tie mr-2"},null,-1),s("Partners ",-1)])]),_:1}),n(o(i),{href:"/admin/centers/index",onClick:d,class:"block px-4 py-2 text-sm text-gray-700 hover:bg-blue-50"},{default:r(()=>[...e[12]||(e[12]=[t("i",{class:"fas fa-building mr-2"},null,-1),s("Centers ",-1)])]),_:1}),n(o(i),{href:"/admin/credits",onClick:d,class:"block px-4 py-2 text-sm text-gray-700 hover:bg-blue-50"},{default:r(()=>[...e[13]||(e[13]=[t("i",{class:"fas fa-coins mr-2"},null,-1),s("Certificate Credits ",-1)])]),_:1})],512),[[p,l.value==="management"]])]),n(o(i),{href:"/logout",method:"post",class:"px-3 py-2 rounded-md text-sm font-medium text-red-600 hover:bg-red-50 flex items-center"},{default:r(()=>[...e[14]||(e[14]=[t("i",{class:"fas fa-sign-out-alt mr-1"},null,-1),s("Logout ",-1)])]),_:1})])])])]))}};export{O as _};
