'use client' import { Button } from '@thedaviddias/design-system/button' import { AlertCircle, AlertTriangle, CheckCircle, Github, Info, Mail, User, X } from 'lucide-react' import Link from 'next/link' import { Card } from '@/components/ui/card' type IconName = | 'user' | 'alert-circle' | 'github' | 'mail' | 'info' | 'check-circle' | 'alert-triangle' const iconMap = { user: User, 'alert-circle': AlertCircle, github: Github, mail: Mail, info: Info, 'check-circle': CheckCircle, 'alert-triangle': AlertTriangle } interface UserMessageBannerProps { icon: IconName title: string description: string variant?: 'info' | 'success' | 'warning' | 'neutral' dismissible?: boolean onDismiss?: () => void actions?: Array<{ label: string href?: string onClick?: () => void variant?: 'default' | 'outline' | 'ghost' icon?: IconName }> className?: string } const variantStyles = { info: 'border-blue-200 bg-blue-50/50 dark:border-blue-800/30 dark:bg-blue-950/20', success: 'border-green-200 bg-green-50/50 dark:border-green-800/30 dark:bg-green-950/20', warning: 'border-orange-200 bg-orange-50/50 dark:border-orange-800/30 dark:bg-orange-950/20', neutral: 'border-border bg-muted/30' } const iconStyles = { info: 'bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300', success: 'bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300', warning: 'bg-orange-100 text-orange-700 dark:bg-orange-900/50 dark:text-orange-300', neutral: 'bg-primary/10 text-primary' } /** * Renders a styled banner with icon, message, and optional action buttons */ export function UserMessageBanner({ icon, title, description, variant = 'neutral', dismissible = false, onDismiss, actions, className = '' }: UserMessageBannerProps) { const IconComponent = iconMap[icon] return ( {dismissible && onDismiss && ( )}

{title}

{description}

{actions && actions.length > 0 && (
{actions.map((action, index) => { const ActionIcon = action.icon ? iconMap[action.icon] : null if (action.href) { return ( ) } return ( ) })}
)}
) }