Liferay.Loader.define("app-builder-web@1.0.73/js/pages/object/ViewObject.es", ['module', 'exports', 'require', 'frontend-js-react-web$react', 'app-builder-web$react-router-dom', '../../components/control-menu/ControlMenu.es', '../../components/navigation-bar/NavigationBar.es', '../../hooks/useDataDefinition.es', '../apps/ListApps.es', '../apps/edit/EditApp.es', '../form-view/EditFormView.es', '../form-view/ListFormViews.es', '../table-view/EditTableView.es', '../table-view/ListTableViews.es'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = void 0;

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

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

    var _ControlMenu = _interopRequireDefault(require("../../components/control-menu/ControlMenu.es"));

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

    var _useDataDefinition2 = _interopRequireDefault(require("../../hooks/useDataDefinition.es"));

    var _ListApps = _interopRequireDefault(require("../apps/ListApps.es"));

    var _EditApp = _interopRequireDefault(require("../apps/edit/EditApp.es"));

    var _EditFormView = _interopRequireDefault(require("../form-view/EditFormView.es"));

    var _ListFormViews = _interopRequireDefault(require("../form-view/ListFormViews.es"));

    var _EditTableView = _interopRequireDefault(require("../table-view/EditTableView.es"));

    var _ListTableViews = _interopRequireDefault(require("../table-view/ListTableViews.es"));

    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 URL = {
      'custom-object': '/',
      'native-object': '/native-objects'
    };

    var _default = function _default(_ref) {
      var _ref$match = _ref.match,
          _ref$match$params = _ref$match.params,
          dataDefinitionId = _ref$match$params.dataDefinitionId,
          objectType = _ref$match$params.objectType,
          path = _ref$match.path;

      var _useDataDefinition = (0, _useDataDefinition2.default)(dataDefinitionId),
          _useDataDefinition$ti = _useDataDefinition.title,
          title = _useDataDefinition$ti === void 0 ? '' : _useDataDefinition$ti;

      return (/*#__PURE__*/_react.default.createElement(_reactRouterDom.Switch, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
          component: _EditFormView.default,
          path: ["".concat(path, "/form-views/add"), "".concat(path, "/form-views/:dataLayoutId(\\d+)")]
        }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
          component: _EditTableView.default,
          path: ["".concat(path, "/table-views/add"), "".concat(path, "/table-views/:dataListViewId(\\d+)")]
        }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
          component: _EditApp.default,
          path: ["".concat(path, "/apps/deploy"), "".concat(path, "/apps/:appId(\\d+)")]
        }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
          path: path,
          render: function render() {
            return (/*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ControlMenu.default, {
                backURL: URL[objectType],
                title: title
              }), /*#__PURE__*/_react.default.createElement(_NavigationBar.default, {
                tabs: [{
                  active: true,
                  label: Liferay.Language.get('form-views'),
                  path: function path(url) {
                    return "".concat(url, "/form-views");
                  }
                }, {
                  label: Liferay.Language.get('table-views'),
                  path: function path(url) {
                    return "".concat(url, "/table-views");
                  }
                }, {
                  label: Liferay.Language.get('apps'),
                  path: function path(url) {
                    return "".concat(url, "/apps");
                  }
                }]
              }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Switch, null, /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
                component: _ListFormViews.default,
                path: "".concat(path, "/form-views")
              }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
                component: _ListTableViews.default,
                path: "".concat(path, "/table-views")
              }), /*#__PURE__*/_react.default.createElement(_reactRouterDom.Route, {
                component: _ListApps.default,
                path: "".concat(path, "/apps")
              })))
            );
          }
        }))
      );
    };

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