import {
  NavSectionVertical_default
} from "./chunk-57RVXMTF.mjs";
import {
  NAV_WIDTH
} from "./chunk-H2T3FU4G.mjs";

// tmp-babel/navigations/web/__shared__/VerticalDrawer/index.js
import { useEffect } from "react";
import { Logo } from "@baseapp-frontend/design-system/components/web/logos";
import { Scrollbar } from "@baseapp-frontend/design-system/components/web/scrollbars";
import Box from "@mui/material/Box";
import Drawer from "@mui/material/Drawer";
import { usePathname } from "next/navigation";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
var VerticalDrawer = function VerticalDrawer2(_ref) {
  var navData = _ref.navData, LogoIcon = _ref.LogoIcon, openNav = _ref.openNav, onCloseNav = _ref.onCloseNav;
  var pathname = usePathname();
  useEffect(function() {
    if (openNav) {
      onCloseNav();
    }
  }, [pathname]);
  return /* @__PURE__ */ _jsx(Drawer, {
    open: openNav,
    onClose: onCloseNav,
    PaperProps: {
      sx: {
        width: NAV_WIDTH.VERTICAL,
        height: "100% !important"
      }
    },
    children: /* @__PURE__ */ _jsxs(Scrollbar, {
      sx: {
        height: 1,
        "& .simplebar-content": {
          height: 1,
          display: "flex",
          flexDirection: "column"
        }
      },
      children: [LogoIcon && /* @__PURE__ */ _jsx(Logo, {
        sx: {
          mt: 3,
          ml: 4,
          mb: 1
        },
        children: /* @__PURE__ */ _jsx(LogoIcon, {})
      }), /* @__PURE__ */ _jsx(NavSectionVertical_default, {
        navData
      }), /* @__PURE__ */ _jsx(Box, {
        sx: {
          flexGrow: 1
        }
      })]
    })
  });
};
var VerticalDrawer_default = VerticalDrawer;

export {
  VerticalDrawer_default
};
//# sourceMappingURL=chunk-TE3XXLZ7.mjs.map