import Button from '../../../button/Button.mjs';
import '../../../common/theme.mjs';
import '../../../common/direction.mjs';
import '../../../common/propsValues/control.mjs';
import '../../../common/propsValues/breakpoint.mjs';
import '../../../common/propsValues/size.mjs';
import { Typography } from '../../../common/propsValues/typography.mjs';
import '../../../common/propsValues/width.mjs';
import '../../../common/propsValues/type.mjs';
import '../../../common/propsValues/dateMode.mjs';
import '../../../common/propsValues/monthFormat.mjs';
import '../../../common/propsValues/position.mjs';
import '../../../common/propsValues/layouts.mjs';
import { Status } from '../../../common/propsValues/status.mjs';
import '../../../common/propsValues/sentiment.mjs';
import '../../../common/propsValues/profileType.mjs';
import '../../../common/propsValues/variant.mjs';
import '../../../common/propsValues/scroll.mjs';
import '../../../common/propsValues/markdownNodeType.mjs';
import '../../../common/fileType.mjs';
import '@transferwise/icons';
import 'clsx';
import 'react';
import 'react-intl';
import '../../../common/closeButton/CloseButton.messages.mjs';
import { jsx, jsxs } from 'react/jsx-runtime';
import ProcessIndicator from '../../../processIndicator/ProcessIndicator.mjs';
import Title from '../../../title/Title.mjs';

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

export { ProcessingStep as default };
//# sourceMappingURL=processingStep.mjs.map
