"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react"),m=require("react-router-dom"),o=require("../../components/Icons/Icons.js");require("../../components/Icons/EuiIcon.js");require("@elastic/eui");require("../../node_modules/.pnpm/twin.macro@2.8.2/node_modules/twin.macro/macro.js");require("../../form/Field.js");require("react-hook-form");require("../../node_modules/.pnpm/@elastic_eui@61.0.0_zavqrpf4tc2kjxw3tjmx3rmpbq/node_modules/@elastic/eui/dist/eui_theme_light.js");require("../../tailwind.js");const f=a=>a&&typeof a=="object"&&"default"in a?a:{default:a},e=f(i),g=({menuData:a={},userData:l={}})=>{var t;return e.default.createElement("div",{className:"flex flex-col justify-between w-56 h-screen overflow-y-auto transition-all duration-300 ease-in-out bg-white border-r transform-translate-x-full "},e.default.createElement("div",{className:"pt-24 pb-10"},e.default.createElement(m.Link,{to:"/settings",className:"flex flex-col items-center justify-center"},e.default.createElement("img",{className:"object-cover w-10 h-10 rounded-full",src:l.img}),e.default.createElement("div",{className:"self-center mt-2 text-base font-semibold text-gray-600 whitespace-nowrap dark:text-white"},l.username),e.default.createElement("p",{className:"text-xs text-gray-400"},l.school)),e.default.createElement("nav",{className:"relative flex flex-col mt-6 space-y-1"},(t=a.mainMenu)==null?void 0:t.map((n,r)=>e.default.createElement(c,{key:r,...n})))))},c=({path:a,name:l,icon:t,label:n,subMenu:r})=>r?e.default.createElement(e.default.Fragment,null,e.default.createElement("details",{className:"group"},e.default.createElement("summary",{className:"flex items-center border-l-[3px] border-transparent px-4 py-2 text-gray-500 rounded-lg cursor-pointer hover:border-gray-100 hover:bg-gray-50 hover:text-gray-600"},t&&e.default.createElement("span",{className:"text-gray-400"},typeof t=="string"?e.default.createElement(o.Icons,{name:t}):t),e.default.createElement("span",{className:"ml-3 font-medium"},l),e.default.createElement("span",{className:"ml-auto transition duration-300 shrink-0 group-open:-rotate-180"},e.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-5 h-5",viewBox:"0 0 20 20",fill:"currentColor"},e.default.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})))),e.default.createElement("nav",{className:"mt-1.5 ml-8 flex flex-col"},r==null?void 0:r.map((d,u)=>e.default.createElement(s,{key:u,...d}))))):e.default.createElement(s,{path:a,name:l,icon:t,label:n}),s=({path:a,name:l,icon:t,label:n})=>e.default.createElement(m.NavLink,{to:a,className:({isActive:r})=>`
        ${r?"bg-green-300 text-green-600 ":"hover:bg-green-300 hover:text-green-600 "}
        flex items-center mx-4 px-4 py-3 text-gray-500 rounded-lg
      `},({isActive:r})=>e.default.createElement(e.default.Fragment,null,t&&e.default.createElement("span",{className:`${r?"text-green-600":"text-gray-400"}`},typeof t=="string"?e.default.createElement(o.Icons,{name:t}):t),e.default.createElement("span",{className:`${r?"text-green-600 font-bold":""} ml-3 font-medium`},l),n&&e.default.createElement("span",{className:"inline-flex items-center justify-center px-2 ml-3 text-sm font-medium text-gray-800 bg-gray-200 rounded-full dark:bg-gray-600 dark:text-gray-300"},n)));exports.AdminSidebar=g;exports.NavItem=s;exports.NavLink=c;
//# sourceMappingURL=AdminSidebar.js.map
