'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var Button_resolver = require('../../../button/Button.resolver.js');
require('../../../common/theme.js');
require('../../../common/direction.js');
require('../../../common/propsValues/control.js');
require('../../../common/propsValues/breakpoint.js');
require('../../../common/propsValues/size.js');
var typography = require('../../../common/propsValues/typography.js');
require('../../../common/propsValues/width.js');
require('../../../common/propsValues/type.js');
require('../../../common/propsValues/dateMode.js');
require('../../../common/propsValues/monthFormat.js');
require('../../../common/propsValues/position.js');
require('../../../common/propsValues/layouts.js');
var status = require('../../../common/propsValues/status.js');
require('../../../common/propsValues/sentiment.js');
require('../../../common/propsValues/profileType.js');
require('../../../common/propsValues/variant.js');
require('../../../common/propsValues/scroll.js');
require('../../../common/propsValues/markdownNodeType.js');
require('../../../common/fileType.js');
require('@transferwise/icons');
require('clsx');
require('react');
require('react-intl');
require('../../../common/closeButton/CloseButton.messages.js');
var jsxRuntime = require('react/jsx-runtime');
var ProcessIndicator = require('../../../processIndicator/ProcessIndicator.js');
var Title = require('../../../title/Title.js');

function ProcessingStep({
  isComplete,
  isError,
  isSuccess,
  onClear,
  psButtonText,
  psProcessingText,
  psButtonDisabled
}) {
  let processStatus = status.Status.PROCESSING;
  if (isError) {
    processStatus = status.Status.FAILED;
  }
  if (isSuccess) {
    processStatus = status.Status.SUCCEEDED;
  }
  return /*#__PURE__*/jsxRuntime.jsx("div", {
    className: "droppable-processing-card droppable-card",
    "aria-hidden": isComplete,
    children: /*#__PURE__*/jsxRuntime.jsxs("div", {
      className: "droppable-card-content",
      children: [/*#__PURE__*/jsxRuntime.jsx(ProcessIndicator.default, {
        status: processStatus
      }), /*#__PURE__*/jsxRuntime.jsx(Title.default, {
        className: "m-y-2",
        type: typography.Typography.TITLE_BODY,
        "aria-live": "polite",
        children: psProcessingText
      }), psButtonText && /*#__PURE__*/jsxRuntime.jsx(Button_resolver.default, {
        v2: true,
        disabled: psButtonDisabled,
        onClick: onClear,
        children: psButtonText
      })]
    })
  });
}

exports.default = ProcessingStep;
//# sourceMappingURL=processingStep.js.map
