import _get from "lodash/fp/get";
import React from 'react';
import PropTypes from 'prop-types';
import { NovaSolidInterfaceFeedbackInterfaceAlertCircle as AlertIcon } from '@coorpacademy/nova-icons';
import ButtonLink from '../../atom/button-link';
import Provider from '../../atom/provider';
import style from './style.css';
const BrandDownloadBox = (props, context) => {
  const {
    title = '',
    warning = '',
    description = '',
    href = '',
    onClick,
    submitValue = ''
  } = props;
  const {
    skin
  } = context;
  const negativeColor = _get('common.negative', skin);
  const type = warning ? /*#__PURE__*/React.createElement("div", {
    className: style.texts
  }, /*#__PURE__*/React.createElement(AlertIcon, {
    className: style.icon,
    style: {
      color: negativeColor
    }
  }), /*#__PURE__*/React.createElement("span", {
    className: style.warning
  }, warning), /*#__PURE__*/React.createElement("p", {
    className: style.description
  }, description)) : /*#__PURE__*/React.createElement("div", {
    className: style.titleTexts
  }, /*#__PURE__*/React.createElement("span", {
    className: style.title
  }, title), /*#__PURE__*/React.createElement("p", {
    className: style.description
  }, description));
  return /*#__PURE__*/React.createElement("div", {
    className: style.wrapper
  }, type, /*#__PURE__*/React.createElement(ButtonLink, {
    className: style.button,
    link: {
      href,
      download: true
    },
    onClick: onClick,
    label: submitValue,
    customStyle: {
      backgroundColor: '#FFA000',
      color: 'white'
    }
  }));
};
BrandDownloadBox.contextTypes = {
  skin: Provider.childContextTypes.skin
};
BrandDownloadBox.propTypes = process.env.NODE_ENV !== "production" ? {
  title: PropTypes.string,
  warning: PropTypes.string,
  description: PropTypes.string,
  href: PropTypes.string,
  onClick: PropTypes.func,
  submitValue: PropTypes.string
} : {};
export default BrandDownloadBox;
//# sourceMappingURL=index.js.map