import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
import { useState } from 'react';
import { SidebarProvider, Sidebar, SidebarContent, SidebarTrigger } from '@bigbinary/neeto-atoms/primitives';
import { useHistory } from 'react-router-dom';
import { C as ConfigureView } from '../ConfigureView-CG1M2-3b.js';
import { jsxs, jsx } from 'react/jsx-runtime';
import '@babel/runtime/helpers/defineProperty';
import '@babel/runtime/helpers/objectWithoutProperties';
import '@bigbinary/neeto-cist';
import '@bigbinary/neeto-commons-frontend/v2/utils/general';
import 'ramda';
import '@bigbinary/neeto-commons-frontend/v2/react-utils/useRegisterNavigationCheckpoint';
import '@bigbinary/neeto-atoms';
import 'classnames';
import '@bigbinary/neeto-filters-frontend/v2/Segments';
import '../chevron-left-BTVCxPw8.js';
import '../createLucideIcon-mNMhCCpf.js';

var ConfigurePageSidebar = function ConfigurePageSidebar(_ref) {
  var label = _ref.label,
    items = _ref.navLinks,
    configurePageRoute = _ref.configurePageRoute;
  var history = useHistory();
  var _useState = useState(false),
    _useState2 = _slicedToArray(_useState, 2),
    isSidebarCollapsed = _useState2[0],
    setIsSidebarCollapsed = _useState2[1];
  var handleConfigureLinkClick = function handleConfigureLinkClick() {
    history.push(configurePageRoute);
  };
  return /*#__PURE__*/jsxs(SidebarProvider, {
    className: "!w-auto",
    open: !isSidebarCollapsed,
    onOpenChange: function onOpenChange(open) {
      return setIsSidebarCollapsed(!open);
    },
    children: [/*#__PURE__*/jsx(Sidebar, {
      collapsible: "offcanvas",
      side: document.documentElement.dir === "rtl" ? "right" : "left",
      children: /*#__PURE__*/jsx(SidebarContent, {
        children: /*#__PURE__*/jsx(ConfigureView, {
          isConfigureSidebar: true,
          handleGoBack: handleConfigureLinkClick,
          navLink: {
            label: label,
            items: items
          }
        })
      })
    }), /*#__PURE__*/jsx(SidebarTrigger, {})]
  });
};

export { ConfigurePageSidebar as default };
//# sourceMappingURL=ConfigurePageSidebar.js.map
