import { GripVertical, Trash2, Plus, ArrowRight } from "lucide-react"; import { Button } from "../../../../components/ui/button"; import { Card } from "../../../../components/ui/card"; import { Input } from "../../../../components/ui/input"; import { VoicePrompt } from "./VoicePrompt"; interface QuestionsStepProps { formData: any; setFormData: (data: any) => void; nextStep: () => void; prevStep: () => void; } export function QuestionsStep({ formData, setFormData, nextStep, prevStep, }: QuestionsStepProps) { const addQuestion = () => { const newQuestion = { id: `q${formData.questions.length + 1}`, text: "", type: "Speaking", voicePrompt: "upload_audio.mp3", sampleAnswer: "upload_audio.mp3", }; setFormData({ ...formData, questions: [...formData.questions, newQuestion], }); }; return (

Create Practice Questions

Define the dialogue flow and interactions for this scenario.

{formData.questions.map((q: any, i: number) => (
Question {i + 1}
{ const newQuestions = [...formData.questions]; newQuestions[i].text = e.target.value; setFormData({ ...formData, questions: newQuestions }); }} className="h-16 rounded-xl border-grayScale-200 font-medium px-6 text-base placeholder:text-grayScale-400 bg-white text-grayScale-700" placeholder="e.g. How long have you been studying English?" />
{ const newQuestions = [...formData.questions]; newQuestions[i].voicePrompt = ""; setFormData({ ...formData, questions: newQuestions }); }} />
{ const newQuestions = [...formData.questions]; newQuestions[i].sampleAnswer = ""; setFormData({ ...formData, questions: newQuestions }); }} />
))}
); }