import { formatMoney } from '@transferwise/formatting';
import { useIntl } from 'react-intl';
import { jsx, Fragment } from 'react/jsx-runtime';

const Money = ({
  amount,
  currency,
  alwaysShowDecimals = false
}) => {
  const {
    locale
  } = useIntl();
  return /*#__PURE__*/jsx(Fragment, {
    children: formatMoney(amount, currency, locale, {
      alwaysShowDecimals
    })
  });
};

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