Liferay.Loader.define("dynamic-data-mapping-form-renderer@5.0.59/js/components/PageRenderer/TabbedVariant.es", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/layout', 'frontend-js-react-web$react', '../Tabs.es', './DefaultVariant.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.Rows = exports.Page = exports.Container = exports.Column = void 0;

    var _layout = _interopRequireDefault(require("@frontend-taglib-clay$clayui/layout"));

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

    var _Tabs = require("../Tabs.es");

    var DefaultVariant = _interopRequireWildcard(require("./DefaultVariant.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 Column = function Column(_ref) {
      var children = _ref.children,
          column = _ref.column,
          index = _ref.index;

      if (column.fields.length === 0) {
        return null;
      }

      return (/*#__PURE__*/_react.default.createElement(_layout.default.Col, {
          key: index,
          md: column.size
        }, column.fields.map(function (field, index) {
          return children({
            field: field,
            index: index
          });
        }))
      );
    };

    exports.Column = Column;

    var Container = function Container(_ref2) {
      var activePage = _ref2.activePage,
          children = _ref2.children,
          pageIndex = _ref2.pageIndex,
          pages = _ref2.pages;
      return (/*#__PURE__*/_react.default.createElement("div", {
          className: "ddm-form-page-container tabbed"
        }, pages.length > 0 && pageIndex === activePage && /*#__PURE__*/_react.default.createElement(_Tabs.Tabs, {
          activePage: activePage,
          pageIndex: pageIndex,
          pages: pages
        }), /*#__PURE__*/_react.default.createElement(DefaultVariant.Container, {
          activePage: activePage,
          isBuilder: false,
          pageIndex: pageIndex
        }, children))
      );
    };

    exports.Container = Container;

    var Page = function Page(_ref3) {
      var children = _ref3.children;
      return children;
    };

    exports.Page = Page;

    var Rows = function Rows(_ref4) {
      var children = _ref4.children,
          rows = _ref4.rows;
      return rows.map(function (row, index) {
        return children({
          index: index,
          row: row
        });
      });
    };

    exports.Rows = Rows;
    //# sourceMappingURL=TabbedVariant.es.js.map
  }
});
//# sourceMappingURL=TabbedVariant.es.js.map