import HomeIconLight from "assets/products/Ag/HomeIconLight.png";
import HomeIconDark from "assets/products/Ag/HomeIconDark.png";
import { ImgIcon } from "common/ImgIcon";
import { useThemeType } from "hooks";
import React from "react";

interface Props {
  type?: "light" | "dark";
  height?: number | string
  width?: number | string
}

export default function HomeIcon(props: Props) {
  const themeType = useThemeType();
  const { type, height, width } = props;

  const src = () => {
    if (type) {
      return type === "light" ? HomeIconLight : HomeIconDark;
    }

    return themeType === "light" ? HomeIconDark : HomeIconLight;
  };

  return <ImgIcon alt="fields" src={src()} iconHeight={height} iconWidth={width} />;
}
