import { getHudIconArt, type HudIconAsset } from '../uiAssets';

export function HudIcon({
  name,
  label,
  className = '',
  decorative = true,
}: {
  name: HudIconAsset;
  label?: string;
  className?: string;
  decorative?: boolean;
}) {
  const src = getHudIconArt(name);
  return <img alt={decorative ? '' : label ?? name} aria-hidden={decorative} className={`hud-icon ${className}`.trim()} src={src} />;
}
