'use client'; import React from 'react'; import { ExternalLink } from 'lucide-react'; import { Button } from './button'; export interface BrandAssociationItem { icon: React.ComponentType<{ size?: number; color?: string; className?: string }> | React.ReactElement; title: string; description: string; buttonText: string; link: string; } export interface BrandAssociationCardProps { item: BrandAssociationItem; className?: string; } export function BrandAssociationCard({ item, className = '' }: BrandAssociationCardProps) { // Helper function to render icon - handle both React elements and components const renderIcon = () => { // If it's already a React element, just return it if (React.isValidElement(item.icon)) { return item.icon; } // If it's a component type, render it with props const IconComponent = item.icon as React.ComponentType<{ size?: number; color?: string; className?: string }>; return ; }; return (
{/* Icon */}
{renderIcon()}
{/* Title */}

{item.title}

{/* Description */}

{item.description}

{/* Browse Button */}
); }