"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.MessageBox = void 0;
var _react = _interopRequireWildcard(require("react"));
var _Message = require("./Message");
var _Padder = require("./Padder");
var MessageBox = function MessageBox(_ref) {
  var message = _ref.message,
    type = _ref.type;
  var color = '#DCDCDC';
  var background = '#fff';
  switch (type) {
    case 'error':
      color = "#F95656";
      background = "rgba(249, 86, 86, 0.1)";
      break;
    case 'succes':
      color = "#5BE2A7";
      background = 'rgba(91, 226, 167, 0.1)';
      break;
    case 'info':
      color = "#56ABF9";
      background = 'rgba(86, 171, 249, 0.1)';
      break;
    case 'warning':
      color = "#FBCD59";
      background = 'rgba(251, 205, 89, 0.1)';
      break;
  }
  return /*#__PURE__*/_react.default.createElement("div", {
    style: {
      borderRadius: 15,
      border: "1px solid ".concat(color),
      background: background,
      marginBottom: '2rem'
    }
  }, /*#__PURE__*/_react.default.createElement(_Padder.Padder, {
    top: "1em",
    left: "2em",
    right: "2em"
  }, /*#__PURE__*/_react.default.createElement(_Message.Message, {
    message: message,
    type: type
  })));
};
exports.MessageBox = MessageBox;
MessageBox.defaultProps = {
  type: 'extra'
};