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

const NodeIconV3 = props => {
  return (
    <IconWrapper {...props}>
      <svg
        width="24"
        height="24"
        viewBox="0 0 24 24"
        xmlns="http://www.w3.org/2000/svg"
      >
        <g
          id="Symbols"
          stroke="none"
          strokeWidth="1"
          fill="none"
          fillRule="evenodd"
        >
          <g id="node">
            <rect
              id="Rectangle-64"
              stroke={getObjectValue(
                props.theme.colors,
                props.iconColor,
                props.theme.colors.grey.deep,
              )}
              strokeLinecap="round"
              strokeLinejoin="round"
              x="2"
              y="9"
              width="19.6900005"
              height="6.86649724"
              rx="3.43324862"
            />
          </g>
        </g>
      </svg>
    </IconWrapper>
  );
};

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

export default withTheme(NodeIconV3);
