"use client" import { useState } from "react" import { Button } from "@/components/ui/button" import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "@/components/ui/dialog" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" import { Label } from "@/components/ui/label" import { Checkbox } from "@/components/ui/checkbox" import { FileDown, Loader2 } from "lucide-react" interface ExportCardsDialogProps { foodId: string } export function ExportCardsDialog({ foodId }: ExportCardsDialogProps) { const [open, setOpen] = useState(false) const [format, setFormat] = useState("csv") const [range, setRange] = useState("all") const [includeHeaders, setIncludeHeaders] = useState(true) const [includeMetadata, setIncludeMetadata] = useState(true) const [isExporting, setIsExporting] = useState(false) const handleExport = async () => { setIsExporting(true) // 模拟导出操作 await new Promise((resolve) => setTimeout(resolve, 2000)) setIsExporting(false) setOpen(false) } return ( 导出卡牌ID 选择导出格式并下载食物 {foodId} 的卡牌ID。
setIncludeHeaders(!!checked)} />
setIncludeMetadata(!!checked)} />
) }