Liferay.Loader.define("commerce-frontend-js@3.0.43/components/dataset_display/management_bar/components/NavBar", ['module', 'exports', 'require', 'frontend-js-react-web$prop-types', 'frontend-js-react-web$react', './ActiveViewSelector', './Context', './CreationMenu', './FiltersDropdown', './MainSearch'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = void 0;

    var _propTypes = _interopRequireDefault(require("frontend-js-react-web$prop-types"));

    var _react = _interopRequireDefault(require("frontend-js-react-web$react"));

    var _ActiveViewSelector = _interopRequireDefault(require("./ActiveViewSelector"));

    var _Context = _interopRequireDefault(require("./Context"));

    var _CreationMenu = _interopRequireDefault(require("./CreationMenu"));

    var _FiltersDropdown = _interopRequireDefault(require("./FiltersDropdown"));

    var _MainSearch = _interopRequireDefault(require("./MainSearch"));

    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }

    /**
     * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
     * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
     */
    function NavBar(props) {
      var _getAppContext = (0, _Context.default)(),
          state = _getAppContext.state;

      return (/*#__PURE__*/_react.default.createElement("nav", {
          className: "management-bar management-bar-light navbar navbar-expand-md"
        }, /*#__PURE__*/_react.default.createElement("div", {
          className: "container-fluid container-fluid-max-xl"
        }, state.filters.length ? /*#__PURE__*/_react.default.createElement("div", {
          className: "mr-2 navbar-nav"
        }, /*#__PURE__*/_react.default.createElement(_FiltersDropdown.default, null)) : null, props.showSearch ? /*#__PURE__*/_react.default.createElement("div", {
          className: "navbar-form navbar-overlay-sm-down pl-0"
        }, /*#__PURE__*/_react.default.createElement(_MainSearch.default, null)) : null, /*#__PURE__*/_react.default.createElement("div", {
          className: "navbar-form navbar-form-autofit navbar-overlay navbar-overlay-sm-down pl-0"
        }, props.views && props.views.length > 1 ? /*#__PURE__*/_react.default.createElement(_ActiveViewSelector.default, {
          activeView: props.activeView,
          setActiveView: props.setActiveView,
          views: props.views
        }) : null), props.creationMenuItems && props.creationMenuItems.length ? /*#__PURE__*/_react.default.createElement(_CreationMenu.default, {
          items: props.creationMenuItems
        }) : null))
      );
    }

    NavBar.defaultProps = {
      creationMenuItems: [],
      showSearch: true
    };
    var _default = NavBar;
    exports.default = _default;
    //# sourceMappingURL=NavBar.js.map
  }
});
//# sourceMappingURL=NavBar.js.map