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

const StartIcon = props => {
  return (
    <IconWrapper {...props}>
      <svg
        width="24"
        height="24"
        viewBox="0 0 24 24"
        fill="none"
        xmlns="http://www.w3.org/2000/svg"
      >
        <g clipPath="url(#clip0_1246_2653)">
          <path
            d="M6 2L18 12L6 22L6 2Z"
            stroke={getObjectValue(
              props.theme.colors,
              props.iconColor,
              props.theme.colors.grey.deep,
            )}
            strokeWidth="2"
            strokeMiterlimit="10"
          />
        </g>
        <defs>
          <clipPath id="clip0_1246_2653">
            <rect width="24" height="24" fill="white" />
          </clipPath>
        </defs>
      </svg>
    </IconWrapper>
  );
};

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

export default withTheme(StartIcon);
