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

const TickIconV3 = props => {
  return (
    <IconWrapper {...props}>
      <svg width="24px" height="24px" viewBox="0 0 24 24">
        <g
          id="Assets"
          stroke="none"
          strokeWidth="1"
          fill="none"
          fillRule="evenodd"
          strokeLinecap="round"
          strokeLinejoin="round"
        >
          <g
            id="icon/tick"
            stroke={getObjectValue(
              props.theme.colors,
              props.iconColor,
              props.theme.colors.grey.deep,
            )}
          >
            <g id="Group-4-Copy-4" transform="translate(3.000000, 3.000000)">
              <circle id="Oval-1-Copy-2" cx="9" cy="9" r="9" />
              <polyline
                id="Oval-1-Copy-3"
                points="13.2866522 5.9419983 7.19152908 12.3094575 4.55962161 9.80996853"
              />
            </g>
          </g>
        </g>
      </svg>
    </IconWrapper>
  );
};

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

export default withTheme(TickIconV3);
