import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["children", "className", "title", "kind"];
import PropTypes from 'prop-types';
import React from 'react';
import classnames from 'classnames';
import Icon from '../Icon';
export var ListItem = function ListItem(_ref) {
  var children = _ref.children,
      className = _ref.className,
      title = _ref.title,
      kind = _ref.kind,
      other = _objectWithoutProperties(_ref, _excluded);

  var classNames = classnames('wfp--list__element', className, {
    'wfp--list-item--checkmark': kind === 'checkmark',
    'wfp--list-item--cross': kind === 'cross'
  });
  return /*#__PURE__*/React.createElement("li", _extends({
    className: classNames
  }, other), kind === 'cross' && /*#__PURE__*/React.createElement(Icon, {
    className: "wfp--list-item__icon",
    icon: {
      styles: '',
      viewBox: '0 0 320 512',
      width: '15',
      height: '15',
      svgData: {
        circles: '',
        ellipses: '',
        paths: [{
          fill: 'currentColor',
          d: 'M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z'
        }],
        polygons: '',
        polylines: '',
        rects: ''
      }
    }
  }), kind === 'checkmark' && /*#__PURE__*/React.createElement(Icon, {
    className: "wfp--list-item__icon",
    icon: {
      styles: '',
      viewBox: '0 0 512 512',
      width: '13',
      height: '13',
      svgData: {
        circles: '',
        ellipses: '',
        paths: [{
          fill: 'currentColor',
          d: 'M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z'
        }],
        polygons: '',
        polylines: '',
        rects: ''
      }
    }
  }), title && /*#__PURE__*/React.createElement("span", {
    className: "wfp--list__element__title"
  }, title), /*#__PURE__*/React.createElement("span", {
    className: "wfp--list__element__content"
  }, children));
};
ListItem.propTypes = {
  /**
   * Provide multiple `ListItem` components
   */
  children: PropTypes.node,

  /**
   * Specify a custom className
   */
  className: PropTypes.string,

  /**
   * Specify a kind.
   */
  kind: PropTypes.oneOf(['checkmark', 'cross']),

  /**
   * Specify if the List should be small
   */
  small: PropTypes.bool
};
export default ListItem;