"use strict";

exports.__esModule = true;
exports.default = exports.Overlay = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _novaIcons = require("@coorpacademy/nova-icons");
var _cssColorFunction = require("css-color-function");
var _loader = _interopRequireDefault(require("../../atom/loader"));
var _overlay = _interopRequireDefault(require("./overlay.css"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const Overlay = ({
  description,
  isLoading,
  iconColor
}) => {
  const dropOverlay = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
    className: _overlay.default.arrow,
    style: {
      border: `15px solid ${(0, _cssColorFunction.convert)(`color(${iconColor} a(-90%))`)}`
    }
  }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidDataTransferDataUpload1, {
    style: {
      color: iconColor
    },
    className: _overlay.default.icon
  })), /*#__PURE__*/_react.default.createElement("p", null, description));
  return /*#__PURE__*/_react.default.createElement("div", {
    className: _overlay.default.overlay,
    "data-testid": "overlay"
  }, isLoading ? /*#__PURE__*/_react.default.createElement(_loader.default, null) : dropOverlay);
};
exports.Overlay = Overlay;
var _default = exports.default = Overlay;
Overlay.propTypes = process.env.NODE_ENV !== "production" ? {
  description: _propTypes.default.string,
  isLoading: _propTypes.default.bool,
  iconColor: _propTypes.default.string
} : {};
//# sourceMappingURL=overlay.js.map