module.exports=[57034,a=>{"use strict";var b=a.i(87924),c=a.i(50944),d=a.i(38246),e=a.i(72131),f=a.i(42343);function g(a){return(0,f.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},child:[]}]})(a)}function h(a){return(0,f.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z"},child:[]}]})(a)}function i(a){return(0,f.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 19V5h6v14H5zm14 0h-6v-7h6v7zm0-9h-6V5h6v5z"},child:[]}]})(a)}function j(a){return(0,f.GenIcon)({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M13 3a9 9 0 0 0-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42A8.954 8.954 0 0 0 13 21a9 9 0 0 0 0-18zm-1 5v5l4.25 2.52.77-1.28-3.52-2.09V8z"},child:[]}]})(a)}var k=a.i(39154),l=a.i(71682);function m(){let a=(0,c.usePathname)(),f=(0,c.useRouter)(),[m,n]=(0,e.useState)("Loading..."),o=[{name:"Dashboard",icon:i,path:"/admin/dashboard"},{name:"Content",icon:g,path:"/admin/content"},{name:"Applicants",icon:k.BiUserPlus,path:"/admin/applicants"},{name:"Teachers",icon:k.BiGroup,path:"/admin/teachers"},{name:"Reviews",icon:l.FaRegCommentAlt,path:"/admin/reviews"},{name:"Activity Log",icon:j,path:"/admin/log"}];(0,e.useEffect)(()=>{(async()=>{try{let a=await fetch("/api/admin/me"),b=await a.json();b.success?n(b.data.name||b.data.username):n("Unknown Admin")}catch(a){console.error("Failed to fetch admin data",a),n("Error")}})()},[]);let p=async()=>{try{await fetch("/api/admin/logout",{method:"POST"}),f.push("/admin/login")}catch(a){console.error("Logout failed",a)}};return(0,b.jsxs)("aside",{className:"w-64 bg-primary text-white min-h-screen flex flex-col font-prompt fixed",children:[(0,b.jsx)("div",{className:"h-24 flex items-center justify-center border-b border-white/10 p-4",children:(0,b.jsx)("div",{className:"text-center",children:(0,b.jsxs)("h1",{className:"font-bold text-xl tracking-wider",children:["PKP",(0,b.jsx)("br",{}),(0,b.jsx)("span",{className:"text-xs font-normal",children:"English Co.,Ltd."})]})})}),(0,b.jsx)("nav",{className:"flex-1 py-6 space-y-2 px-4",children:o.map(c=>{let e=a===c.path,f=c.icon;return(0,b.jsx)(d.default,{href:c.path,children:(0,b.jsxs)("div",{className:`flex items-center gap-4 px-4 py-3 rounded-lg cursor-pointer transition-all ${e?"bg-accent text-primary font-bold shadow-md":"text-gray-300 hover:bg-white/10 hover:text-white"}`,children:[(0,b.jsx)(f,{size:24}),(0,b.jsx)("span",{children:c.name})]})},c.name)})}),(0,b.jsxs)("div",{className:"bg-[#F3F4F6] text-primary p-4 flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("div",{className:"w-10 h-10 bg-blue-200 rounded-full flex items-center justify-center overflow-hidden",children:(0,b.jsx)("img",{src:"https://api.dicebear.com/7.x/notionists/svg?seed=Admin",alt:"avatar"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-bold truncate uppercase",children:m}),(0,b.jsx)("p",{className:"text-xs text-gray-500",children:"Admin"})]})]}),(0,b.jsx)("button",{onClick:p,className:"text-primary hover:text-red-600 transition p-2",children:(0,b.jsx)(h,{size:24})})]})]})}function n({children:a}){return"/admin/login"===(0,c.usePathname)()?(0,b.jsx)(b.Fragment,{children:a}):(0,b.jsxs)("div",{className:"flex font-prompt bg-[#EFEFEF] text-gray-800 antialiased min-h-screen",children:[(0,b.jsx)(m,{}),(0,b.jsx)("main",{className:"flex-1 ml-64 p-8",children:a})]})}a.s(["default",()=>n],57034)}];

//# sourceMappingURL=src_app_admin_AdminLayoutWrapper_tsx_ce1a390d._.js.map