'use client'; import { useState } from 'react'; import { ChevronDown, ListChecks, PanelRightClose, PanelRightOpen, } from 'lucide-react'; import { useScopedI18n } from '@/locales/client'; import { Option } from '@/types'; interface Question { id: number; content: string; options: Option[]; } interface ProgressPanelProps { questions: Question[]; answers: { [key: number]: string }; activePanelQuestion: number | null; goToQuestion: (questionId: number) => void; showProgressPanel: boolean; toggleProgressPanel: () => void; completionPercentage: number; } export function ProgressPanel({ questions, answers, activePanelQuestion, goToQuestion, showProgressPanel, toggleProgressPanel, completionPercentage, }: ProgressPanelProps) { const t = useScopedI18n('component.questionnaire.test.public.progressPanel'); const [showMobileQuestions, setShowMobileQuestions] = useState(false); const questionGrid = (
{questions.map((_, index) => { const questionNumber = index + 1; return ( ); })}
); return ( <>
{showMobileQuestions && (
{questionGrid}
)}