/** * AvatarGeneratingLoader — Professional animated loader for avatar generation. * * Matches the Immagine / Animate processing overlay pattern: * purple-themed spinner + status text + optional progress + cancel. * * Uses the same color palette (purple-400/500/600) and backdrop-blur * as the rest of the application for visual consistency. */ import React from 'react'; import { Loader2, X } from 'lucide-react'; export function AvatarGeneratingLoader({ label = 'Generating…', hint, progress, onCancel, variant = 'inline', count, aspectClass = 'aspect-[2/3]', }) { const isOverlay = variant === 'overlay'; return (
{/* Animated spinner — matches Immagine / Animate processing overlay */}
{/* Outer glow pulse */}
{/* Core spinner icon */}
{/* Status text */}
{label} {hint && {hint}}
{/* Progress bar (when provided) */} {typeof progress === 'number' && (
{Math.round(progress)}%
)} {/* Skeleton grid preview */} {count && count > 0 && (
{Array.from({ length: count }).map((_, i) => (
))}
)} {/* Cancel button */} {onCancel && ()}
); }