// This component is a simpler version of the generic Chip component, in use in CoorpManager.

import React, { useMemo } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { NovaSolidRemoveAddAddCircle1 as AddIcon, NovaSolidStatusCheckCircle2 as SelectedIcon } from '@coorpacademy/nova-icons';
import style from './style.css';
const Chips = props => {
  const {
    text,
    information,
    selected = false,
    onClick
  } = props;
  const handleClick = useMemo(() => () => onClick(), [onClick]);
  return /*#__PURE__*/React.createElement("div", {
    className: classnames(style.container, selected ? style.selected : style.unselected),
    onClick: handleClick,
    "aria-label": `${text} ${information}`,
    "data-name": text
  }, /*#__PURE__*/React.createElement("div", {
    className: style.textZone,
    title: text
  }, /*#__PURE__*/React.createElement("span", {
    className: style.text
  }, text), /*#__PURE__*/React.createElement("span", {
    className: style.information
  }, information)), selected ? /*#__PURE__*/React.createElement(SelectedIcon, {
    className: style.selectedIconWrapper
  }) : /*#__PURE__*/React.createElement(AddIcon, {
    className: style.unselectedIconWrapper
  }));
};
Chips.propTypes = process.env.NODE_ENV !== "production" ? {
  text: PropTypes.string,
  information: PropTypes.string,
  selected: PropTypes.bool,
  onClick: PropTypes.func
} : {};
export default Chips;
//# sourceMappingURL=index.js.map