import React from "react";
import PropTypes from "prop-types";
import { withTheme } from "styled-components";
import { getObjectValue } from "../utils/util";
import IconWrapper from "../IconWrapper";

const TickIconV4 = props => {
  return (
    <IconWrapper {...props}>
      <svg
        width="24"
        height="24"
        viewBox="0 0 24 24"
        fill="none"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          fillRule="evenodd"
          clipRule="evenodd"
          d="M7.48864 19.0619L2.48874 14.5613C1.83709 13.9747 1.83709 13.0266 2.48874 12.44C3.14039 11.8534 4.19371 11.8534 4.84536 12.44L8.57195 15.7945L19.0684 5.02445C19.6684 4.39437 20.72 4.32236 21.4167 4.86093C22.1167 5.40101 22.1983 6.34614 21.5983 6.97473L9.93192 18.9764C9.63026 19.2945 9.1936 19.4835 8.73028 19.5C8.22529 19.5015 7.8003 19.344 7.48864 19.0619Z"
          fill={getObjectValue(
            props.theme.colors,
            props.iconColor,
            props.theme.colors.grey.deep,
          )}
        />
      </svg>
    </IconWrapper>
  );
};

TickIconV4.propTypes = {
  iconColor: PropTypes.string,
};

export default withTheme(TickIconV4);
