import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from '@/components/ui/dialog'; import { Button } from '@/components/ui/button'; import { Badge } from '@/components/ui/badge'; import { Edit, CheckCircle, XCircle, Clock } from 'lucide-react'; import type { SubmissionItemWithDeps } from '@/lib/submissionItemsService'; interface ItemSelectorDialogProps { items: SubmissionItemWithDeps[]; open: boolean; onOpenChange: (open: boolean) => void; onSelectItem: (item: SubmissionItemWithDeps) => void; onBulkEdit?: () => void; } export function ItemSelectorDialog({ items, open, onOpenChange, onSelectItem, onBulkEdit }: ItemSelectorDialogProps) { const getStatusIcon = (status: string) => { switch (status) { case 'approved': return ; case 'rejected': return ; default: return ; } }; const getStatusColor = (status: string) => { switch (status) { case 'approved': return 'bg-green-100 text-green-800 border-green-200'; case 'rejected': return 'bg-red-100 text-red-800 border-red-200'; case 'pending': return 'bg-yellow-100 text-yellow-800 border-yellow-200'; default: return 'bg-gray-100 text-gray-800 border-gray-200'; } }; return ( Select Item to Edit This submission contains {items.length} items. Choose which one to edit, or edit all at once.
{/* Bulk Edit Option */} {onBulkEdit && items.length > 1 && ( )} {/* Individual Items */} {items.map((item) => ( ))}
); }