import GearMarkerLight from "assets/products/Ag/gearMarkerLight.png";
import GearMarkerDark from "assets/products/Ag/gearMarkerDark.png";
import { ImgIcon } from "common/ImgIcon";
import { useThemeType } from "hooks";
import React from "react";

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

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

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

    return themeType === "light" ? GearMarkerDark : GearMarkerLight;
  };

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