import { cn } from '@/components/ui/core/styling'; import { FiGithub } from 'react-icons/fi'; import { AiOutlineDiscord } from 'react-icons/ai'; import { FaPatreon } from 'react-icons/fa6'; import { SiBuymeacoffee, SiGithubsponsors, SiKofi } from 'react-icons/si'; import { Tooltip } from '../ui/tooltip'; import { FaGlobe } from 'react-icons/fa6'; type SocialIconProps = { id: | 'github' | 'discord' | 'ko-fi' | 'patreon' | 'buymeacoffee' | 'github-sponsors' | 'website'; url: string; className?: string; }; export function SocialIcon({ id, url, className }: SocialIconProps) { const getTooltip = () => { switch (id) { case 'github': return "View the addon's GitHub repository"; case 'discord': return "Join the Developer's Discord"; case 'github-sponsors': return 'Sponsor the Developer on GitHub'; case 'ko-fi': return 'Support the Developer on Ko-fi'; case 'patreon': return 'Support the Developer on Patreon'; case 'buymeacoffee': return 'Support the Developer on Buy Me a Coffee'; default: return null; } }; const tooltip = getTooltip(); return tooltip ? ( } > {tooltip} ) : ( ); } const SocialIconComponent = ({ id, url, className }: SocialIconProps) => { const getIcon = () => { switch (id) { case 'website': return ; case 'discord': return ; case 'github': return ; case 'github-sponsors': return ; case 'ko-fi': return ; case 'patreon': return ; case 'buymeacoffee': return ; default: return null; } }; return ( {getIcon()} ); };