Liferay.Loader.define("dynamic-data-mapping-form-renderer@5.0.47/js/components/Tabs.es", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/layout', '@frontend-taglib-clay$clayui/tabs', 'frontend-js-react-web$react', '../actions/eventTypes.es', '../hooks/useForm.es'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.Tabs = void 0;

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

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

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

    var _eventTypes = require("../actions/eventTypes.es");

    var _useForm = require("../hooks/useForm.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 Tabs = function Tabs(_ref) {
      var activePage = _ref.activePage,
          pages = _ref.pages;
      var dispatch = (0, _useForm.useForm)();
      return (/*#__PURE__*/_react.default.createElement("nav", {
          className: "component-tbar ddm-form-tabs mb-3 tbar"
        }, /*#__PURE__*/_react.default.createElement(_layout.default.ContainerFluid, {
          className: "pr-0"
        }, /*#__PURE__*/_react.default.createElement(_tabs.default, null, pages.map(function (page, index) {
          return (/*#__PURE__*/_react.default.createElement(_tabs.default.Item, {
              active: index === activePage,
              disabled: !page.enabled,
              key: index,
              onClick: function onClick() {
                return dispatch({
                  payload: index,
                  type: _eventTypes.EVENT_TYPES.CHANGE_ACTIVE_PAGE
                });
              }
            }, /*#__PURE__*/_react.default.createElement("span", {
              className: "navbar-text-truncate"
            }, page.title))
          );
        }))))
      );
    };

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