Liferay.Loader.define("app-builder-web@1.0.76/js/App.es", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/modal', 'frontend-js-react-web$classnames', 'frontend-js-react-web$react', 'frontend-js-react-web$react-dnd', 'frontend-js-react-web$react-dnd-html5-backend', 'app-builder-web$react-router-dom', './AppContext.es', './components/navigation-bar/NavigationBar.es', './pages/custom-object/ListCustomObjects.es', './pages/native-object/ListNativeObjects.es', './pages/object/ViewObject.es'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    function _typeof(obj) {
      "@babel/helpers - typeof";
      if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
        _typeof = function _typeof(obj) {
          return typeof obj;
        };
      } else {
        _typeof = function _typeof(obj) {
          return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
        };
      }return _typeof(obj);
    }

    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = exports.AppNavigationBar = void 0;

    var _modal = require("@frontend-taglib-clay$clayui/modal");

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

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

    var _reactDnd = require("frontend-js-react-web$react-dnd");

    var _reactDndHtml5Backend = require("frontend-js-react-web$react-dnd-html5-backend");

    var _reactRouterDom = require("app-builder-web$react-router-dom");

    var _AppContext = require("./AppContext.es");

    var _NavigationBar = _interopRequireDefault(require("./components/navigation-bar/NavigationBar.es"));

    var _ListCustomObjects = _interopRequireDefault(require("./pages/custom-object/ListCustomObjects.es"));

    var _ListNativeObjects = _interopRequireDefault(require("./pages/native-object/ListNativeObjects.es"));

    var _ViewObject = _interopRequireDefault(require("./pages/object/ViewObject.es"));

    function _getRequireWildcardCache() {
      if (typeof WeakMap !== "function") return null;var cache = new WeakMap();_getRequireWildcardCache = function _getRequireWildcardCache() {
        return cache;
      };return cache;
    }

    function _interopRequireWildcard(obj) {
      if (obj && obj.__esModule) {
        return obj;
      }if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
        return { default: obj };
      }var cache = _getRequireWildcardCache();if (cache && cache.has(obj)) {
        return cache.get(obj);
      }var newObj = {};var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;for (var key in obj) {
        if (Object.prototype.hasOwnProperty.call(obj, key)) {
          var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;if (desc && (desc.get || desc.set)) {
            Object.defineProperty(newObj, key, desc);
          } else {
            newObj[key] = obj[key];
          }
        }
      }newObj.default = obj;if (cache) {
        cache.set(obj, newObj);
      }return newObj;
    }

    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.
     */
    var AppNavigationBar = function AppNavigationBar() {
      var _useContext = (0, _react.useContext)(_AppContext.AppContext),
          showNativeObjectsTab = _useContext.showNativeObjectsTab;

      if (!showNativeObjectsTab) {
        return null;
      }

      return (/*#__PURE__*/_react.default.createElement(_NavigationBar.default, {
          tabs: [{
            active: true,
            exact: true,
            label: Liferay.Language.get('custom'),
            path: function path() {
              return '/';
            }
          }, {
            label: Liferay.Language.get('native'),
            path: function path() {
              return '/native-objects';
            }
          }]
        })
      );
    };

    exports.AppNavigationBar = AppNavigationBar;

    var _default = function _default(props) {
      return (/*#__PURE__*/_react.default.createElement(_reactDnd.DndProvider, {
          backend: _reactDndHtml5Backend.HTML5Backend
        }, /*#__PURE__*/_react.default.createElement(_AppContext.AppContextProvider, props, /*#__PURE__*/_react.default.createElement(_modal.ClayModalProvider, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.HashRouter, null, /*#__PURE__*/_react.default.createElement("div", {
          className: (0, _classnames.default)('custom-object-app', {
            'publications-enabled': document.querySelector('.change-tracking-indicator')
          })
        }, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Switch, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
          component: _ListCustomObjects.default,
          exact: true,
          path: "/"
        }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
          component: _ListNativeObjects.default,
          path: "/native-objects"
        }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
          component: _ViewObject.default,
          path: "/:objectType/:dataDefinitionId(\\d+)"
        })))))))
      );
    };

    exports.default = _default;
    //# sourceMappingURL=App.es.js.map
  }
});
//# sourceMappingURL=App.es.js.map