import VentilationDarkIcon from "assets/products/ventilation/ventIconDark.png";
import VentilationLightIcon from "assets/products/ventilation/ventIconLight.png";
import { ImgIcon } from "common/ImgIcon";
import { useThemeType } from "hooks";

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

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

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

    return themeType === "light" ? VentilationDarkIcon : VentilationLightIcon;
  };

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