'use strict';

var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
var React = require('react');
var neetoAtoms = require('@bigbinary/neeto-atoms');
var reactRouterDom = require('react-router-dom');
var ConfigureView = require('../ConfigureView-DGf7cRMQ.js');
var jsxRuntime = require('react/jsx-runtime');
require('@babel/runtime/helpers/defineProperty');
require('@babel/runtime/helpers/objectWithoutProperties');
require('@bigbinary/neeto-cist');
require('@bigbinary/neeto-commons-frontend/react-utils');
require('@bigbinary/neeto-commons-frontend/utils/general');
require('ramda');
require('@bigbinary/neeto-commons-frontend/react-utils/useRegisterNavigationCheckpoint');
require('classnames');
require('@bigbinary/neeto-filters-frontend/Segments');
require('../createLucideIcon-DBDhE7kE.js');

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

module.exports = ConfigurePageSidebar;
//# sourceMappingURL=ConfigurePageSidebar.js.map
