import React from 'react';
import PropTypes from 'prop-types';
import { NovaSolidDataTransferDataUpload1 as UploadIcon } from '@coorpacademy/nova-icons';
import { convert } from 'css-color-function';
import Loader from '../../atom/loader';
import style from './overlay.css';
export const Overlay = ({
  description,
  isLoading,
  iconColor
}) => {
  const dropOverlay = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
    className: style.arrow,
    style: {
      border: `15px solid ${convert(`color(${iconColor} a(-90%))`)}`
    }
  }, /*#__PURE__*/React.createElement(UploadIcon, {
    style: {
      color: iconColor
    },
    className: style.icon
  })), /*#__PURE__*/React.createElement("p", null, description));
  return /*#__PURE__*/React.createElement("div", {
    className: style.overlay,
    "data-testid": "overlay"
  }, isLoading ? /*#__PURE__*/React.createElement(Loader, null) : dropOverlay);
};
export default Overlay;
Overlay.propTypes = process.env.NODE_ENV !== "production" ? {
  description: PropTypes.string,
  isLoading: PropTypes.bool,
  iconColor: PropTypes.string
} : {};
//# sourceMappingURL=overlay.js.map