"use client"; import { memo } from "react"; import { SparklesIcon } from "./icons"; import { Scissors } from "lucide-react"; interface ImageProcessingLoadingProps { type: "enhance" | "rmbg"; // 处理类型:变清晰或抠图 } /** * 图片处理加载占位符组件 * 显示类似 Gemini 生图的动态卡片效果 */ export const ImageProcessingLoading = memo(({ type }: ImageProcessingLoadingProps) => { const isEnhance = type === "enhance"; const color = isEnhance ? "blue" : "green"; const text = isEnhance ? "正在变清晰" : "正在抠图"; const icon = isEnhance ? SparklesIcon : Scissors; const Icon = icon; // 根据类型设置颜色类名 const colorClasses = isEnhance ? { ping: "bg-blue-500/20", pulse: "bg-blue-500/10", ring: "ring-blue-500/30", text: "text-blue-500", dot: "bg-blue-500", gradientFrom: "from-blue-400", gradientFromOverlay: "from-blue-500/40", gradientToOverlay: "to-blue-500/30", } : { ping: "bg-green-500/20", pulse: "bg-green-500/10", ring: "ring-green-500/30", text: "text-green-500", dot: "bg-green-500", gradientFrom: "from-green-400", gradientFromOverlay: "from-green-500/40", gradientToOverlay: "to-green-500/30", }; return (