Liferay.Loader.define("layout-content-page-editor-web@2.0.123/page_editor/plugins/contents/components/ContentsSidebar", ['module', 'exports', 'require', 'frontend-js-react-web$react', '../../../app/store/index', '../../../common/components/SidebarPanelContent', '../../../common/components/SidebarPanelHeader', './NoPageContents', './PageContents'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = ContentsSidebar;

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

    var _index = require("../../../app/store/index");

    var _SidebarPanelContent = _interopRequireDefault(require("../../../common/components/SidebarPanelContent"));

    var _SidebarPanelHeader = _interopRequireDefault(require("../../../common/components/SidebarPanelHeader"));

    var _NoPageContents = _interopRequireDefault(require("./NoPageContents"));

    var _PageContents = _interopRequireDefault(require("./PageContents"));

    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 ContentsSidebar() {
      var pageContents = (0, _index.useSelector)(function (state) {
        return state.pageContents;
      });

      var view = /*#__PURE__*/_react.default.createElement(_NoPageContents.default, null);

      if (pageContents.length) {
        view = /*#__PURE__*/_react.default.createElement(_PageContents.default, {
          pageContents: pageContents
        });
      }

      return (/*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_SidebarPanelHeader.default, null, Liferay.Language.get('contents')), /*#__PURE__*/_react.default.createElement(_SidebarPanelContent.default, {
          padded: false
        }, view))
      );
    }
    //# sourceMappingURL=ContentsSidebar.js.map
  }
});
//# sourceMappingURL=ContentsSidebar.js.map