import HeaterDarkIcon from "assets/components/heaterDark.png";
import HeaterLightIcon from "assets/components/heaterLight.png";
import { ImgIcon } from "common/ImgIcon";
import { useThemeType } from "hooks";
import React from "react";

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

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

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

    return themeType === "light" ? HeaterDarkIcon : HeaterLightIcon;
  };

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