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

export default function Filter({
  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="M11.8465882,0.569411765 C10.5609412,0.202352941 8.86117647,0 7.05882353,0 C5.25647059,0 3.55576471,0.202352941
            2.27105882,0.569411765 C1.61788235,0.755764706 1.09835294,0.977882353 0.724705882,1.23011765 C0.125176471,1.63482353
            4.4408921e-16,2.064 4.4408921e-16,2.35294118 L4.4408921e-16,2.82352941 C4.4408921e-16,3.22635294 0.302117647,3.88988235
            0.601411765,4.33788235 L5.20470588,11.2423529 C5.44094118,11.5962353 5.648,12.2804706 5.648,12.7058824 L5.648,15.5294118
            C5.648,15.6922353 5.73270588,15.8437647 5.87105882,15.9294118 C5.94635294,15.9764706 6.032,16 6.11858824,16 C6.19011765,16
            6.26258824,15.9830588 6.32941176,15.9501176 L8.21176471,15.0089412 C8.37082353,14.9289412 8.47152941,14.7661176
            8.47152941,14.5882353 L8.47152941,12.7058824 C8.47152941,12.2804706 8.67858824,11.5962353 8.91482353,11.2423529
            L13.5181176,4.33788235 C13.8164706,3.88988235 14.1195294,3.22541176 14.1195294,2.82352941 L14.1195294,2.35294118
            C14.1195294,2.064 13.9934118,1.63482353 13.3948235,1.23011765 C13.0202353,0.977882353 12.4997647,0.755764706
            11.8465882,0.569411765 Z M2.52988235,1.47482353 C3.73364706,1.13129412 5.34211765,0.941176471 7.05882353,0.941176471
            C8.77552941,0.941176471 10.3849412,1.13035294 11.5877647,1.47482353 C12.8847059,1.84564706 13.1764706,2.24282353
            13.1764706,2.35294118 C13.1764706,2.46305882 12.8847059,2.86117647 11.5877647,3.23105882 C10.384,3.57458824
            8.77552941,3.76470588 7.05882353,3.76470588 C5.34211765,3.76470588 3.73270588,3.57552941 2.52988235,3.23105882
            C1.23294118,2.86023529 0.941176471,2.46305882 0.941176471,2.35294118 C0.941176471,2.24282353 1.23294118,1.84470588
            2.52988235,1.47482353 Z M7.52941176,12.7058824 L7.52941176,14.2974118 L6.58823529,14.768 L6.58823529,12.7058824
            C6.58823529,12.0978824 6.32376471,11.2263529 5.98682353,10.7209412 L1.39388235,3.83152941 C1.65176471,3.94164706
            1.94447059,4.04423529 2.27105882,4.13647059 C3.55670588,4.50352941 5.25647059,4.70588235 7.05882353,4.70588235
            C8.86117647,4.70588235 10.5618824,4.50352941 11.8465882,4.13647059 C12.1722353,4.04329412 12.4658824,3.94164706
            12.7237647,3.83058824 L8.13082353,10.72 C7.79388235,11.2263529 7.52941176,12.0988235 7.52941176,12.7058824 Z"
          />
        </g>
      </g>
    </svg>
  );
}

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

Filter.defaultProps = {
  ...Icon.defaultProps,
  width: 15,
  height: 16,
  viewBox: '0 0 15 16',
};
