import React__default from 'react';
import ErrorIcon from '../../Icons/ErrorIcon/index.js';
import InfoIcon from '../../Icons/InfoIcon/index.js';
import SuccessIcon from '../../Icons/SuccessIcon/index.js';
import WarningIcon from '../../Icons/WarningIcon/index.js';
import { ModalWrapper, ModalSub, ModalIconWrapper } from './style.js';
import { Modaltext } from '../../Typography/Paragraph/index.js';
import theme from '../../../Globals/theme.js';
import { ThemeProvider } from 'styled-components';
import globalStyle from '../../../Globals/global-styles.js';

var Modal = function Modal(_ref) {
  var type = _ref.type;

  var ModalType = function ModalType(type) {
    if (type === "error") {
      return /*#__PURE__*/React__default.createElement(ErrorIcon, null);
    } else if (type === "success") {
      return /*#__PURE__*/React__default.createElement(SuccessIcon, null);
    } else if (type === "info") {
      return /*#__PURE__*/React__default.createElement(InfoIcon, null);
    } else if (type === "warning") {
      return /*#__PURE__*/React__default.createElement(WarningIcon, null);
    } else {
      return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
    }
  };

  var ModalClass = function ModalClass(type) {
    if (type === "error") {
      return "error";
    } else if (type === "success") {
      return "success";
    } else if (type === "info") {
      return "info";
    } else if (type === "warning") {
      return "warning";
    } else {
      return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
    }
  };

  return /*#__PURE__*/React__default.createElement(ThemeProvider, {
    theme: theme
  }, /*#__PURE__*/React__default.createElement(globalStyle, null), /*#__PURE__*/React__default.createElement(ModalWrapper, {
    className: ModalClass(type)
  }, /*#__PURE__*/React__default.createElement(ModalSub, null, /*#__PURE__*/React__default.createElement(ModalIconWrapper, null, ModalType(type)), /*#__PURE__*/React__default.createElement(Modaltext, null, type))));
};

export { Modal as default };
//# sourceMappingURL=index.js.map
