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

const WarningIconV2 = 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="M12.9091 14.3684H11.0909V9.63158H12.9091V14.3684ZM12.9091 18.1579H11.0909V16.2632H12.9091V18.1579ZM2 21H22L12 3L2 21Z"
          fill={getObjectValue(
            props.theme.colors,
            props.iconColor,
            props.theme.colors.yellow.neon,
          )}
        />
      </svg>
    </IconWrapper>
  );
};
WarningIconV2.propTypes = {
  iconColor: PropTypes.string,
};

export default withTheme(WarningIconV2);
