import e from "react";
import { Link as i, NavLink as p } from "react-router-dom";
import { Icons as s } from "../../components/Icons/Icons.js";
import "../../components/Icons/EuiIcon.js";
import "@elastic/eui";
import "../../node_modules/.pnpm/twin.macro@2.8.2/node_modules/twin.macro/macro.js";
import "../../form/Field.js";
import "react-hook-form";
import "../../node_modules/.pnpm/@elastic_eui@61.0.0_zavqrpf4tc2kjxw3tjmx3rmpbq/node_modules/@elastic/eui/dist/eui_theme_light.js";
import "../../tailwind.js";
const b = ({ menuData: m = {}, userData: a = {} }) => {
  var t;
  return /* @__PURE__ */ e.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 "
  }, /* @__PURE__ */ e.createElement("div", {
    className: "pt-24 pb-10"
  }, /* @__PURE__ */ e.createElement(i, {
    to: "/settings",
    className: "flex flex-col items-center justify-center"
  }, /* @__PURE__ */ e.createElement("img", {
    className: "object-cover w-10 h-10 rounded-full",
    src: a.img
  }), /* @__PURE__ */ e.createElement("div", {
    className: "self-center mt-2 text-base font-semibold text-gray-600 whitespace-nowrap dark:text-white"
  }, a.username), /* @__PURE__ */ e.createElement("p", {
    className: "text-xs text-gray-400"
  }, a.school)), /* @__PURE__ */ e.createElement("nav", {
    className: "relative flex flex-col mt-6 space-y-1"
  }, (t = m.mainMenu) == null ? void 0 : t.map(
    (l, r) => /* @__PURE__ */ e.createElement(g, {
      key: r,
      ...l
    })
  ))));
}, g = ({ path: m, name: a, icon: t, label: l, subMenu: r }) => r ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("details", {
  className: "group"
}, /* @__PURE__ */ e.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 && /* @__PURE__ */ e.createElement("span", {
  className: "text-gray-400"
}, typeof t == "string" ? /* @__PURE__ */ e.createElement(s, {
  name: t
}) : t), /* @__PURE__ */ e.createElement("span", {
  className: "ml-3 font-medium"
}, a), /* @__PURE__ */ e.createElement("span", {
  className: "ml-auto transition duration-300 shrink-0 group-open:-rotate-180"
}, /* @__PURE__ */ e.createElement("svg", {
  xmlns: "http://www.w3.org/2000/svg",
  className: "w-5 h-5",
  viewBox: "0 0 20 20",
  fill: "currentColor"
}, /* @__PURE__ */ e.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"
})))), /* @__PURE__ */ e.createElement("nav", {
  className: "mt-1.5 ml-8 flex flex-col"
}, r == null ? void 0 : r.map((o, c) => /* @__PURE__ */ e.createElement(n, {
  key: c,
  ...o
}))))) : /* @__PURE__ */ e.createElement(n, {
  path: m,
  name: a,
  icon: t,
  label: l
}), n = ({ path: m, name: a, icon: t, label: l }) => /* @__PURE__ */ e.createElement(p, {
  to: m,
  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 }) => /* @__PURE__ */ e.createElement(e.Fragment, null, t && /* @__PURE__ */ e.createElement("span", {
  className: `${r ? "text-green-600" : "text-gray-400"}`
}, typeof t == "string" ? /* @__PURE__ */ e.createElement(s, {
  name: t
}) : t), /* @__PURE__ */ e.createElement("span", {
  className: `${r ? "text-green-600 font-bold" : ""} ml-3 font-medium`
}, a), l && /* @__PURE__ */ e.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"
}, l)));
export {
  b as AdminSidebar,
  n as NavItem,
  g as NavLink
};
//# sourceMappingURL=AdminSidebar.js.map
