import { CheckCircle, AlertCircle } from '@transferwise/icons';
import { clsx } from 'clsx';
import 'react';
import Body from '../body/Body.mjs';
import '../common/theme.mjs';
import '../common/direction.mjs';
import '@transferwise/neptune-tokens';
import '../common/propsValues/control.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 '../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/formatting';
import 'react-intl';
import '../common/closeButton/CloseButton.messages.mjs';
import { jsxs, jsx } from 'react/jsx-runtime';

const TableStatusText = ({
  text,
  className,
  status,
  typography = 'default'
}) => {
  const typographyType = status ?? typography === 'default-bold' ? Typography.BODY_DEFAULT_BOLD : Typography.BODY_DEFAULT;
  return /*#__PURE__*/jsxs(Body, {
    type: typographyType,
    className: clsx(className, {
      'np-table-content--success': status === 'success',
      'np-table-content--error': status === 'error'
    }),
    children: [text, status === 'success' && /*#__PURE__*/jsx(CheckCircle, {
      className: "tw-icon--status",
      "data-testid": "check-icon"
    }), status === 'error' && /*#__PURE__*/jsx(AlertCircle, {
      className: "tw-icon--status",
      "data-testid": "alert-icon"
    })]
  });
};

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