/** * SelfLabelIndicator - Content warning for posts with self-labels. * Implements blur/reveal pattern per AT Protocol self-labeling. * @see specs/prd-web.md Section M7 (Self-label indicators) * @see decisions/content-moderation.md */ 'use client' import { useState, type ReactNode } from 'react' import { Eye, EyeSlash, Warning } from '@phosphor-icons/react' import { cn } from '@/lib/utils' interface SelfLabelIndicatorProps { labels: string[] children?: ReactNode className?: string } export function SelfLabelIndicator({ labels, children, className }: SelfLabelIndicatorProps) { const [revealed, setRevealed] = useState(false) if (labels.length === 0) return null return (
{children && (
{revealed &&
{children}
}
)}
) }