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

const BusinessManager = props => {
  return (
    <IconWrapper {...props}>
      <svg
        width="24"
        height="24"
        viewBox="0 0 24 24"
        fill="none"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          fillRule="evenodd"
          clipRule="evenodd"
          d="M14 6.21053V4.10526H10V6.21053H14ZM4 8.31579V19.8947H20V8.31579H4ZM20 6.21053C21.11 6.21053 22 7.14737 22 8.31579V19.8947C22 21.0632 21.11 22 20 22H4C2.89 22 2 21.0632 2 19.8947L2.01 8.31579C2.01 7.14737 2.89 6.21053 4 6.21053H8V4.10526C8 2.93684 8.89 2 10 2H14C15.11 2 16 2.93684 16 4.10526V6.21053H20Z"
          fill={getObjectValue(
            props.theme.colors,
            props.iconColor,
            props.theme.colors.grey.deep,
          )}
        />
      </svg>
    </IconWrapper>
  );
};

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

export default withTheme(BusinessManager);
