import FuelDark from "assets/components/fuelDark.png";
import FuelLight from "assets/components/fuelLight.png";
import { ImgIcon } from "common/ImgIcon";
import { useThemeType } from "hooks";
import React from "react";

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

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

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

    return themeType === "light" ? FuelDark : FuelLight;
  };

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