import type { SVGProps } from 'react'; import { BadgeCheck, Bell, Bolt, BookOpen, Bot, Box, Boxes, Brain, Brush, Building2, ChartColumn, ChartLine, Check, CircleHelp, Cloud, CreditCard, Database, Download, FileCode, GitBranch, Globe, Hash, IdCard, Key, Layers, LayoutGrid, Link, ListChecks, Lock, Mail, Monitor, Network, PaintBucket, Plug, Route, Server, Shield, SlidersHorizontal, Sparkles, TableProperties, Terminal, User, Users, Waypoints, Workflow, X, type LucideIcon, } from 'lucide-react'; type IconComponent = LucideIcon | ((props: SVGProps) => React.ReactElement); // Brand icons are not part of lucide, so they are inlined here. export function GitHubIcon(props: SVGProps) { return ( ); } export function DiscordIcon(props: SVGProps) { return ( ); } export function SlackIcon(props: SVGProps) { return ( ); } export function LinkedInIcon(props: SVGProps) { return ( ); } export function YouTubeIcon(props: SVGProps) { return ( ); } export function AppleIcon(props: SVGProps) { return ( ); } export function WindowsIcon(props: SVGProps) { return ( ); } export function LinuxIcon(props: SVGProps) { return ( ); } export function AndroidIcon(props: SVGProps) { return ( ); } function PostgresIcon(props: SVGProps) { return ; } /** Font Awesome names used by the Mintlify content -> equivalent icon */ const icons: Record = { plug: Plug, link: Link, desktop: Monitor, display: Monitor, sparkles: Sparkles, building: Building2, 'user-group': Users, users: Users, user: User, 'id-card': IdCard, 'chart-bar': ChartColumn, 'chart-simple': ChartColumn, 'chart-line': ChartLine, bell: Bell, 'file-code': FileCode, 'circle-nodes': Waypoints, 'code-branch': GitBranch, server: Server, 'circle-question': CircleHelp, question: CircleHelp, sliders: SlidersHorizontal, box: Box, cube: Box, cubes: Boxes, 'boxes-stacked': Boxes, 'layer-group': Layers, route: Route, 'list-check': ListChecks, globe: Globe, shield: Shield, 'network-wired': Network, sitemap: Network, 'diagram-project': Workflow, cloud: Cloud, book: BookOpen, download: Download, database: Database, postgres: PostgresIcon, terminal: Terminal, 'table-list': TableProperties, robot: Bot, lock: Lock, key: Key, hashtag: Hash, 'grid-2': LayoutGrid, envelope: Mail, 'credit-card': CreditCard, check: Check, certificate: BadgeCheck, bucket: PaintBucket, brush: Brush, brain: Brain, bolt: Bolt, x: X, github: GitHubIcon, discord: DiscordIcon, slack: SlackIcon, linkedin: LinkedInIcon, youtube: YouTubeIcon, }; export function Icon({ name, ...props }: { name?: string } & SVGProps) { if (!name) return null; const Component = icons[name]; if (!Component) { if (process.env.NODE_ENV === 'development') console.warn(`[icons] no mapping for "${name}"`); return null; } return ; } export function hasIcon(name?: string) { return !!name && name in icons; }