"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
require("./Toast.css");
var _jsxRuntime = require("react/jsx-runtime");
function Toast(_ref) {
  let message = _ref.message,
    _ref$type = _ref.type,
    type = _ref$type === void 0 ? 'error' : _ref$type;
  if (!message) {
    return null;
  }
  const testId = type === 'success' ? 'success-toast' : 'error-toast';
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
    className: "toast toast-".concat(type),
    role: "alert",
    "data-testid": testId,
    children: message
  });
}
var _default = exports.default = Toast;