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

const JourneyIcon = 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.5 2L17.3625 4.8625L13.7625 8.4625L15.5375 10.2375L19.1375 6.6375L22 9.5V2H14.5ZM9.5 2H2V9.5L4.8625 6.6375L10.75 12.5125V22H13.25V11.4875L6.6375 4.8625L9.5 2Z"
          fill={getObjectValue(
            props.theme.colors,
            props.iconColor,
            props.theme.colors.grey.deep,
          )}
        />
      </svg>
    </IconWrapper>
  );
};

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

export default withTheme(JourneyIcon);
