import WeedsLight from "assets/products/Ag/weedsLight.png";
import WeedsDark from "assets/products/Ag/weedsDark.png";
import { useThemeType } from "hooks";
import React from "react";

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

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

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

    return themeType === "light" ? WeedsDark : WeedsLight;
  };

  return <img width={width} height={height} alt="weedsIcon" src={src()} />;
}
