"use client" import React, { useState } from 'react' import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs' import { FileUpload } from '@/components/ui/file-upload' import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' import { Image, Play, Music, Trash2 } from 'lucide-react' import { Button } from '@/components/ui/button' interface FoodMediaUploadProps { /** 当前图片URL */ imageUrl?: string /** 当前动画URL */ animationUrl?: string /** 当前音频URL */ audioUrl?: string /** 图片上传成功回调 */ onImageUpload?: (url: string) => void /** 动画上传成功回调 */ onAnimationUpload?: (url: string) => void /** 音频上传成功回调 */ onAudioUpload?: (url: string) => void /** 文件移除回调 */ onRemove?: (type: 'image' | 'animation' | 'audio') => void /** 是否禁用 */ disabled?: boolean } export function FoodMediaUpload({ imageUrl, animationUrl, audioUrl, onImageUpload, onAnimationUpload, onAudioUpload, onRemove, disabled = false, }: FoodMediaUploadProps) { const [activeTab, setActiveTab] = useState('image') return (