Liferay.Loader.define("commerce-frontend-js@3.0.33/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 };
    }

    /**
     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
     *
     * This library is free software; you can redistribute it and/or modify it under
     * the terms of the GNU Lesser General Public License as published by the Free
     * Software Foundation; either version 2.1 of the License, or (at your option)
     * any later version.
     *
     * This library is distributed in the hope that it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
     * details.
     */
    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