import ACHomeLightIcon from "assets/products/Construction/acHomeIconLight.png";
import ACHomeDarkIcon from "assets/products/Construction/acHomeIconDark.png";
import { ImgIcon } from "common/ImgIcon";
import { useThemeType } from "hooks";
import React from "react";

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

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

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

    return themeType === "light" ? ACHomeDarkIcon : ACHomeLightIcon;
  };

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