Liferay.Loader.define("portal-workflow-metrics-web@2.0.46/js/shared/components/modal-with-steps/ModalWithSteps.es", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/alert', '@frontend-taglib-clay$clayui/button', '@frontend-taglib-clay$clayui/modal', 'frontend-js-react-web$react', '../step-bar/StepBar.es'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = void 0;

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

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

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

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

    var _StepBar = _interopRequireDefault(require("../step-bar/StepBar.es"));

    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }

    /**
     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
     *
     * The contents of this file are subject to the terms of the Liferay Enterprise
     * Subscription License ("License"). You may not use this file except in
     * compliance with the License. You can obtain a copy of the License by
     * contacting Liferay, Inc. See the License for the specific language governing
     * permissions and limitations under the License, including but not limited to
     * distribution rights of the Software.
     */
    var ModalWithSteps = function ModalWithSteps(_ref) {
      var error = _ref.error,
          _ref$modalSize = _ref.modalSize,
          modalSize = _ref$modalSize === void 0 ? 'lg' : _ref$modalSize,
          observer = _ref.observer,
          step = _ref.step,
          _ref$stepsCount = _ref.stepsCount,
          stepsCount = _ref$stepsCount === void 0 ? 2 : _ref$stepsCount,
          visible = _ref.visible;
      return (/*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, visible && /*#__PURE__*/_react.default.createElement(_modal.default, {
          observer: observer,
          size: modalSize
        }, /*#__PURE__*/_react.default.createElement(_modal.default.Header, null, step.title), error && /*#__PURE__*/_react.default.createElement(_alert.default, {
          className: "mb-0",
          displayType: "danger",
          title: Liferay.Language.get('error')
        }, error), /*#__PURE__*/_react.default.createElement(_StepBar.default, {
          current: step.order,
          title: step.subtitle,
          total: stepsCount
        }), /*#__PURE__*/_react.default.createElement(step.component, step.props), /*#__PURE__*/_react.default.createElement(_modal.default.Footer, {
          first: step.cancelBtn && /*#__PURE__*/_react.default.createElement(_button.default, {
            disabled: step.cancelBtn.disabled,
            displayType: "secondary",
            onClick: step.cancelBtn.handle
          }, Liferay.Language.get('cancel')),
          last: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, step.previousBtn && /*#__PURE__*/_react.default.createElement(_button.default, {
            className: "mr-3",
            disabled: step.previousBtn.disabled,
            displayType: "secondary",
            onClick: step.previousBtn.handle
          }, Liferay.Language.get('previous')), /*#__PURE__*/_react.default.createElement(_button.default, {
            disabled: step.nextBtn.disabled,
            onClick: step.nextBtn.handle
          }, step.nextBtn.text))
        })))
      );
    };

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