function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
import React from 'react';
import { NovaSolidStatusCheckCircle2 as CheckIcon } from '@coorpacademy/nova-icons';
import ButtonLink from '../../atom/button-link';
import Loader from '../../atom/loader';
import style from './style.css';
import { propTypes } from './types';
const buildIcon = progression => {
  if (progression === undefined) return null;
  if (progression === 100) return /*#__PURE__*/React.createElement("div", {
    className: style.icon
  }, /*#__PURE__*/React.createElement(CheckIcon, null));
  return /*#__PURE__*/React.createElement("div", {
    className: style.loader
  }, /*#__PURE__*/React.createElement(Loader, {
    theme: "coorpmanager"
  }));
};
const BulkInfos = ({
  mainText,
  subText,
  imageUrl,
  progression,
  firstButtonLink,
  secondButtonLink
}) => /*#__PURE__*/React.createElement("div", {
  className: style.container
}, /*#__PURE__*/React.createElement("div", {
  className: style.header
}, imageUrl && typeof imageUrl === 'string' ? /*#__PURE__*/React.createElement("img", {
  className: style.img,
  src: imageUrl,
  "aria-hidden": "true"
}) : null, buildIcon(progression)), /*#__PURE__*/React.createElement("p", {
  className: style.mainText
}, `${mainText} ${progression === undefined || progression === 100 ? '' : `${progression}%`}`), /*#__PURE__*/React.createElement("p", {
  className: style.subText
}, subText), /*#__PURE__*/React.createElement("div", {
  className: style.buttonsContainer
}, firstButtonLink ? /*#__PURE__*/React.createElement("div", {
  className: style.buttonContainer
}, /*#__PURE__*/React.createElement(ButtonLink, _extends({}, firstButtonLink, {
  className: style.button
}))) : null, secondButtonLink ? /*#__PURE__*/React.createElement("div", {
  className: style.buttonContainer
}, /*#__PURE__*/React.createElement(ButtonLink, _extends({}, secondButtonLink, {
  className: style.button
}))) : null));
BulkInfos.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
export default BulkInfos;
//# sourceMappingURL=index.js.map