import { Alert, AlertTitle } from '@material-ui/lab';
import { FormattedMessage } from 'react-intl';
import { jsx as _jsx } from "react/jsx-runtime";
export default function ErrorFallback(_ref) {
  var _error$stack;

  var error = _ref.error,
      customMessage = _ref.customMessage;
  console.error((_error$stack = error.stack) !== null && _error$stack !== void 0 ? _error$stack : error);
  return /*#__PURE__*/_jsx(Alert, {
    severity: "error",
    children: /*#__PURE__*/_jsx(AlertTitle, {
      children: customMessage !== null && customMessage !== void 0 ? customMessage : /*#__PURE__*/_jsx(FormattedMessage, {
        id: "d64spB",
        defaultMessage: [{
          "type": 0,
          "value": "Tapahtui odottamaton virhe."
        }]
      })
    })
  });
}
//# sourceMappingURL=ErrorFallback.js.map