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

const FlightLandingIcon = props => {
  return (
    <IconWrapper {...props}>
      <svg
        width="24"
        height="24"
        viewBox="0 0 24 24"
        fill="none"
        xmlns="http://www.w3.org/2000/svg"
      >
        <g clipPath="url(#clip0_2140_5831)">
          <path
            d="M2 19.8947H22V22H2V19.8947ZM19.7263 16.5789C20.5684 16.8 21.4316 16.3053 21.6632 15.4632C21.8842 14.6211 21.3895 13.7579 20.5474 13.5263L14.9579 12.0316L12.0526 2.53684L10.0211 2V10.7158L4.78947 9.31579L3.81053 6.87368L2.28421 6.46316V11.9053L19.7263 16.5789Z"
            fill={getObjectValue(
              props.theme.colors,
              props.iconColor,
              props.theme.colors.grey.deep,
            )}
          />
        </g>
        <defs>
          <clipPath id="clip0_2140_5831">
            <rect width="24" height="24" fill="white" />
          </clipPath>
        </defs>
      </svg>
    </IconWrapper>
  );
};

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

export default withTheme(FlightLandingIcon);
