import { renderIcon } from '@/lib/og';

// Favicon plus the PWA sizes the manifest references (/icon/192, /icon/512).
export function generateImageMetadata() {
  return [32, 192, 512].map((px) => ({ id: String(px), size: { width: px, height: px }, contentType: 'image/png' }));
}

export default async function Icon({ id }: { id: Promise<string> }) {
  const px = Number(await id);
  return renderIcon(Number.isFinite(px) && px > 0 ? px : 32);
}
