import FieldNamesWhite from "assets/products/Ag/fieldNamesWhite.png";
import FieldNamesBlack from "assets/products/Ag/fieldNamesBlack.png";
import { ImgIcon } from "common/ImgIcon";
import { useThemeType } from "hooks";
import React from "react";

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

export default function FieldNamesIcon(props: Props) {
  const themeType = useThemeType();
  const { type } = props;

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

    return themeType === "light" ? FieldNamesBlack : FieldNamesWhite;
  };

  return <ImgIcon alt="fields" src={src()} />;
}
