import Link from 'next/link' import { BookOpen, Code, Users, ExternalLink, BookA } from 'lucide-react' import { IconYoutubeSolid } from 'ui' interface ExploreItem { title: string link: string itemType?: string description?: string } interface ExploreMoreProps { items: ExploreItem[] } // Icon mapping based on itemType function getIcon(itemType?: string) { if (!itemType) return BookOpen const lowerType = itemType.toLowerCase() if (lowerType === 'doc' || lowerType === 'documentation') { return BookA } if (lowerType === 'reference' || lowerType === 'api') { return Code } if (lowerType === 'community' || lowerType === 'forum') { return Users } if (lowerType === 'video' || lowerType === 'tutorial') { return IconYoutubeSolid } return BookA // default icon } // Default descriptions based on itemType function getDescription(itemType?: string): string { if (!itemType) return 'Learn more about this topic' const lowerType = itemType.toLowerCase() if (lowerType === 'doc' || lowerType === 'documentation') { return 'Complete guides and references' } if (lowerType === 'reference' || lowerType === 'api') { return 'Detailed API documentation' } if (lowerType === 'community' || lowerType === 'forum') { return 'Get help from the community' } if (lowerType === 'video' || lowerType === 'tutorial') { return 'Watch video tutorials and guides' } return 'Learn more about this topic' } export function ExploreMore({ items }: ExploreMoreProps) { if (!items || items.length === 0) { return null } return (

Explore More

{items.map((item, index) => { const isExternal = item.link.startsWith('http://') || item.link.startsWith('https://') const Icon = getIcon(item.itemType) const description = item.description || getDescription(item.itemType) const cardContent = (

{item.title}

{description}

) if (isExternal) { return ( {cardContent} ) } return ( {cardContent} ) })}
) }