

import type { TNetworkChoiceIconKey } from "@buzzwaretech/constants";
// buzzwareTech imports
import { GlobeIcon, LockIcon } from "@buzzwaretech/propel/icons";
import { cn } from "@buzzwaretech/utils";

type Props = {
  iconKey: TNetworkChoiceIconKey;
  className?: string;
};

export function ProjectNetworkIcon(props: Props) {
  const { iconKey, className } = props;
  // Get the icon key
  const getProjectNetworkIcon = () => {
    switch (iconKey) {
      case "Lock":
        return LockIcon;
      case "Globe2":
        return GlobeIcon;
      default:
        return null;
    }
  };

  // Get the icon
  const Icon = getProjectNetworkIcon();
  if (!Icon) return null;

  return <Icon className={cn("h-3 w-3", className)} />;
}
