/** Inline SVG icons for metadata providers */
interface ProviderIconProps {
provider: string;
size?: number;
className?: string;
}
export function ProviderIcon({ provider, size = 16, className = "" }: ProviderIconProps) {
const style = { width: size, height: size, flexShrink: 0 };
switch (provider) {
case "google_books":
// Stylized book (Google Books)
return (
);
case "open_library":
// Open book (Open Library)
return (
);
case "comicvine":
// Explosion / star burst (ComicVine)
return (
);
case "anilist":
// Stylized play / triangle (AniList)
return (
);
case "bedetheque":
// French flag-inspired book (Bédéthèque)
return (
);
default:
// Generic globe
return (
);
}
}
export const PROVIDERS = [
{ value: "google_books", label: "Google Books" },
{ value: "open_library", label: "Open Library" },
{ value: "comicvine", label: "ComicVine" },
{ value: "anilist", label: "AniList" },
{ value: "bedetheque", label: "Bédéthèque" },
] as const;
export function providerLabel(value: string) {
return PROVIDERS.find((p) => p.value === value)?.label ?? value.replace("_", " ");
}