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

const EditIconV2 = props => {
  return (
    <IconWrapper {...props}>
      <svg
        width="24"
        height="24"
        viewBox="0 0 24 24"
        fill="none"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          d="M14.2889 8.68889L15.3111 9.71111L5.24444 19.7778H4.22222V18.7556L14.2889 8.68889ZM18.2889 2C18.0111 2 17.7222 2.11111 17.5111 2.32222L15.4778 4.35556L19.6444 8.52222L21.6778 6.48889C22.1111 6.05556 22.1111 5.35556 21.6778 4.92222L19.0778 2.32222C18.8556 2.1 18.5778 2 18.2889 2ZM14.2889 5.54444L2 17.8333V22H6.16667L18.4556 9.71111L14.2889 5.54444Z"
          fill={getObjectValue(
            props.theme.colors,
            props.iconColor,
            props.theme.colors.grey.deep,
          )}
        />
      </svg>
    </IconWrapper>
  );
};

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

export default withTheme(EditIconV2);
