import React from 'react';
import { NovaLineContentEditionQuillCircle as QuillCircle, NovaSolidRemoveAddAddCircle2 as AddCircle, NovaSolidStatusClose as Close, NovaSolidStatusCheckCircle2 as Check, NovaCompositionCoorpacademyImportIcon as ImportIcon } from '@coorpacademy/nova-icons';
import PropTypes from 'prop-types';
import Provider from '../../atom/provider';
import style from './style.css';
const Choice = ({
  title,
  subtitle,
  onClick,
  children
}) => {
  return /*#__PURE__*/React.createElement("a", {
    className: style.choice,
    onClick: onClick
  }, /*#__PURE__*/React.createElement("div", {
    className: style.choiceContent
  }, /*#__PURE__*/React.createElement("div", {
    className: style.choiceLeftIconWrapper
  }, children), /*#__PURE__*/React.createElement("div", {
    className: style.choiceDescription
  }, /*#__PURE__*/React.createElement("h3", {
    className: style.choiceDescriptionTitle
  }, title), /*#__PURE__*/React.createElement("span", {
    className: style.choiceDescriptionSubtitle
  }, subtitle))), /*#__PURE__*/React.createElement("div", {
    className: style.choiceRightIconWrapper
  }, /*#__PURE__*/React.createElement(Check, {
    className: style.choiceRightIcon
  })));
};
Choice.propTypes = process.env.NODE_ENV !== "production" ? {
  title: PropTypes.string,
  subtitle: PropTypes.string,
  onClick: PropTypes.func,
  children: PropTypes.node
} : {};
const Modal = props => {
  const {
    header,
    description,
    choices,
    onClose
  } = props;
  return /*#__PURE__*/React.createElement("div", {
    className: style.modalWrapper
  }, /*#__PURE__*/React.createElement("div", {
    className: style.modal
  }, /*#__PURE__*/React.createElement("header", {
    className: style.header
  }, /*#__PURE__*/React.createElement("div", {
    className: style.headerRightContent
  }, /*#__PURE__*/React.createElement("div", {
    className: style.headerRightIconWrapper
  }, /*#__PURE__*/React.createElement(AddCircle, {
    className: style.headerAddIcon
  }), /*#__PURE__*/React.createElement("div", {
    className: style.shadow
  })), /*#__PURE__*/React.createElement("h3", null, header)), /*#__PURE__*/React.createElement(Close, {
    onClick: onClose,
    className: style.headerCloseIcon
  })), /*#__PURE__*/React.createElement("div", {
    className: style.description
    // eslint-disable-next-line react/no-danger
    ,
    dangerouslySetInnerHTML: {
      __html: description
    }
  }), /*#__PURE__*/React.createElement("div", {
    className: style.choices
  }, /*#__PURE__*/React.createElement(Choice, {
    key: choices.left.title,
    title: choices.left.title,
    subtitle: choices.left.subtitle
    // eslint-disable-next-line react/jsx-handler-names
    ,
    onClick: choices.left.onClick
  }, /*#__PURE__*/React.createElement(QuillCircle, {
    className: style.choiceLeftIcon
  })), /*#__PURE__*/React.createElement(Choice, {
    key: choices.right.title,
    title: choices.right.title,
    subtitle: choices.right.subtitle
    // eslint-disable-next-line react/jsx-handler-names
    ,
    onClick: choices.right.onClick
  }, /*#__PURE__*/React.createElement(ImportIcon, {
    className: style.choiceLeftIcon
  })))));
};
Modal.propTypes = process.env.NODE_ENV !== "production" ? {
  header: PropTypes.string,
  description: PropTypes.string,
  choices: PropTypes.shape({
    left: PropTypes.shape({
      title: Choice.propTypes.title,
      subtitle: Choice.propTypes.subtitle,
      onClick: Choice.propTypes.onClick
    }),
    right: PropTypes.shape({
      title: Choice.propTypes.title,
      subtitle: Choice.propTypes.subtitle,
      onClick: Choice.propTypes.onClick
    })
  }),
  onClose: PropTypes.func
} : {};
Modal.contextTypes = {
  skin: Provider.childContextTypes.skin
};
export default Modal;
//# sourceMappingURL=index.js.map