import type { ReactNode } from 'react';
import { cn } from '@/lib/utils';

interface AnalyticsIconInfoProps {
    children: ReactNode;
    content: ReactNode;
    widgetLabel: string;
    className?: string;
}

export function AnalyticsIconInfo({ children, widgetLabel, className }: AnalyticsIconInfoProps) {
    return (
        <span
            className={cn(
                'inline-flex shrink-0 cursor-help rounded-[13px] outline-none',
                'focus-visible:ring-2 focus-visible:ring-white/30',
                className,
            )}
            aria-label={`About ${widgetLabel}`}
            title={widgetLabel}
        >
            {children}
        </span>
    );
}
