import PropTypes from 'prop-types';
import React from 'react';
import Icon from '../icon';

export default function Chart({
  stroke,
  fill,
  strokeWidth,
  style: styleProp,
  ...rest // eslint-disable-line comma-dangle
}) {
  const style = {
    ...styleProp,
    ...Icon.defaultProps.style,
  };
  return (
    <svg style={style} {...rest}>
      <g stroke="none" strokeWidth={strokeWidth} fill="none" fillRule="evenodd">
        <g fillRule="nonzero" fill={fill}>
          <path
            d="M6.11764706,16 C5.33905882,16 4.70588235,15.3668235 4.70588235,14.5882353 C4.70588235,13.8096471 5.33905882,13.1764706
            6.11764706,13.1764706 C6.89623529,13.1764706 7.52941176,13.8096471 7.52941176,14.5882353 C7.52941176,15.3668235 6.89623529,16
            6.11764706,16 Z"
          />
          <path
            d="M12.7058824,16 C11.9272941,16 11.2941176,15.3668235 11.2941176,14.5882353 C11.2941176,13.8096471 11.9272941,13.1764706
            12.7058824,13.1764706 C13.4844706,13.1764706 14.1176471,13.8096471 14.1176471,14.5882353 C14.1176471,15.3668235 13.4844706,16
            12.7058824,16 Z"
          />
          <path
            d="M15.5661176,2.32188235 C15.3298824,2.04235294 14.9731765,1.88235294 14.5882353,1.88235294 L3.06541176,1.88235294
            L2.97223529,1.32141176 C2.84894118,0.580705882 2.16376471,-8.8817842e-16 1.41176471,-8.8817842e-16 L0.470588235,-8.8817842e-16
            C0.210823529,-8.8817842e-16 0,0.210823529 0,0.470588235 C0,0.730352941 0.210823529,0.941176471 0.470588235,0.941176471
            L1.41176471,0.941176471 C1.70070588,0.941176471 1.99623529,1.19152941 2.04329412,1.47670588 L3.616,10.9138824
            C3.73929412,11.6545882 4.42447059,12.2352941 5.17647059,12.2352941 L14.5882353,12.2352941 C14.848,12.2352941
            15.0588235,12.0244706 15.0588235,11.7647059 C15.0588235,11.5049412 14.848,11.2941176 14.5882353,11.2941176
            L5.17647059,11.2941176 C4.88752941,11.2941176 4.592,11.0437647 4.54494118,10.7585882 L4.31247059,9.36564706
            L13.6912941,8.54964706 C14.4207059,8.48658824 15.0870588,7.87105882 15.2075294,7.14823529 L15.8390588,3.35811765
            C15.9021176,2.97788235 15.8032941,2.59952941 15.5670588,2.32094118 L15.5661176,2.32188235 Z M14.9101176,3.20376471
            L14.2785882,6.99388235 C14.2287059,7.29129412 13.9105882,7.58588235 13.6094118,7.61223529 L4.15717647,8.43388235
            L3.22164706,2.82258824 L14.5872941,2.82258824 C14.6974118,2.82258824 14.7896471,2.86023529 14.8470588,2.92894118
            C14.9044706,2.99764706 14.9270588,3.09458824 14.9091765,3.20282353 L14.9101176,3.20376471 Z"
          />
        </g>
      </g>
    </svg>
  );
}

Chart.propTypes = {
  ...Icon.propTypes,
  stroke: PropTypes.string,
  fill: PropTypes.string,
  strokeWidth: PropTypes.number,
};

Chart.defaultProps = Icon.defaultProps;
