import _keys from "lodash/fp/keys";
import _get from "lodash/fp/get";
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { NovaCompositionNavigationMore as MoreIcon, NovaSolidLoginLocked as LockIcon, NovaSolidLocksLockUnlock1 as UnlockIcon, NovaCompositionCoorpacademyCheck as CheckIcon } from '@coorpacademy/nova-icons';
import style from './notification.css';
const NOTIFICATION_ICON = {
  addFavorite: CheckIcon,
  removeFavorite: MoreIcon,
  lock: LockIcon,
  unlock: UnlockIcon
};
const handleOverlayClick = e => {
  e.stopPropagation();
  e.preventDefault();
  return false;
};
const Notification = props => {
  const {
    message,
    icon
  } = props;
  const IconType = _get(icon, NOTIFICATION_ICON);
  return /*#__PURE__*/React.createElement("div", {
    "data-name": "notification",
    "data-type": icon,
    onClick: handleOverlayClick,
    className: classnames(style.showOverlay, style.notificationWrapper)
  }, /*#__PURE__*/React.createElement("div", {
    className: style.notification
  }, /*#__PURE__*/React.createElement(IconType, {
    className: style.icon,
    style: {
      color: null
    },
    stroke: null
  }), /*#__PURE__*/React.createElement("div", {
    className: style.message
  }, /*#__PURE__*/React.createElement("span", {
    role: "status"
  }, message))));
};
Notification.propTypes = process.env.NODE_ENV !== "production" ? {
  message: PropTypes.string.isRequired,
  icon: PropTypes.oneOf(_keys(NOTIFICATION_ICON)).isRequired
} : {};
export default Notification;
//# sourceMappingURL=notification.js.map