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

const MessageBubbleIconV2 = 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="M20 2H4C2.9 2 2 2.9 2 4V22L6 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2ZM20 16H6L4 18V4H20V16Z"
          fill={getObjectValue(props.theme.colors, props.iconColor, "#A2CE70")}
        />
      </svg>
    </IconWrapper>
  );
};

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

export default withTheme(MessageBubbleIconV2);
