// update logo images when they share official black and white
import LibraCartLogoWhite from "assets/marketplaceImages/LibraCartGrey.png";
import LibraCartLogoBlack from "assets/marketplaceImages/LibraCartGrey.png";
import { ImgIcon } from "common/ImgIcon";
import { useThemeType } from "hooks";

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

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

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

    return themeType === "light" ? LibraCartLogoBlack : LibraCartLogoWhite;
  };

  return <ImgIcon alt="libra-cart" src={src()} />;
}