'use client'; import { useState } from 'react'; interface UploadParticipant { name: string; apiEndpoint: string; apiKey: string; } interface CreateTaskModalProps { onClose: () => void; onSubmit: (taskData: { description: string; participants: UploadParticipant[] }) => void; currentUploadName: string; } export default function CreateTaskModal({ onClose, onSubmit, currentUploadName }: CreateTaskModalProps) { const [description, setDescription] = useState(''); const [participants, setParticipants] = useState([ { name: currentUploadName, apiEndpoint: '', apiKey: '' } // Current upload is default ]); const handleAddParticipant = () => { setParticipants([...participants, { name: '', apiEndpoint: '', apiKey: '' }]); }; const handleParticipantChange = ( index: number, field: keyof UploadParticipant, value: string ) => { const newParticipants = [...participants]; newParticipants[index] = { ...newParticipants[index], [field]: value }; setParticipants(newParticipants); }; const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); onSubmit({ description, participants }); }; return (

Create New Multi-Upload Task