import { useEffect, useState } from "react";
interface IconProps {
size?: number;
className?: string;
}
const LOBE_ICONS_VERSION = "latest"; // pin if needed, e.g. "1.4.0"
const LOBE_BASE = `https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@${LOBE_ICONS_VERSION}/icons`;
function IconImage({
urls,
alt,
size,
className,
}: {
urls: string[];
alt: string;
size: number;
className?: string;
}) {
const [index, setIndex] = useState(0);
useEffect(() => {
setIndex(0);
}, [urls.join("|")]);
const src = urls[index] ?? urls[urls.length - 1];
return (
{
if (index < urls.length - 1) {
setIndex((i) => i + 1);
}
}}
/>
);
}
export function ClaudeIcon({ size = 16, className = "" }: IconProps) {
return (
);
}
export function CodexIcon({ size = 16, className = "" }: IconProps) {
return (
);
}
export function GeminiIcon({ size = 16, className = "" }: IconProps) {
return (
);
}