"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.Message = void 0;
var _react = _interopRequireDefault(require("react"));
require("../styles/type.css");
var _reactFeather = require("react-feather");
var Message = function Message(_ref) {
  var message = _ref.message,
    type = _ref.type;
  var settings = {};
  switch (type) {
    case 'error':
      settings = {
        color: "#F95656",
        labelMessage: 'Error'
      };
      break;
    case 'succes':
      settings = {
        color: "#5BE2A7",
        labelMessage: 'Succes'
      };
      break;
    case 'info':
      settings = {
        color: "#56ABF9",
        labelMessage: 'Info'
      };
      break;
    case 'warning':
      settings = {
        color: "#FBCD59",
        labelMessage: 'Warning'
      };
      break;
    default:
      settings = {
        color: "#DCDCDC",
        labelMessage: 'Extra'
      };
      break;
  }
  var _settings = settings,
    color = _settings.color,
    labelMessage = _settings.labelMessage;
  return /*#__PURE__*/_react.default.createElement("div", {
    style: {
      display: 'flex',
      alignItems: 'flex-start',
      marginBottom: 12
    }
  }, /*#__PURE__*/_react.default.createElement("div", {
    style: {
      display: 'flex',
      alignItems: 'center'
    }
  }, /*#__PURE__*/_react.default.createElement(_reactFeather.AlertCircle, {
    size: 18,
    color: color
  }), /*#__PURE__*/_react.default.createElement("label", {
    style: {
      color: color,
      margin: 0,
      marginLeft: 8
    }
  }, labelMessage, ":")), /*#__PURE__*/_react.default.createElement("p", {
    style: {
      fontWeight: 500,
      color: color,
      margin: 0,
      marginLeft: 8
    }
  }, message));
};
exports.Message = Message;
Message.defaultProps = {
  type: 'extra'
};