import React from 'react'; import { Progress } from './Progress'; export interface QuestionnaireProps extends React.HTMLAttributes { currentIndex?: number; totalQuestions: number; children: React.ReactNode; } export const Questionnaire: React.FC = ({ currentIndex = 0, totalQuestions, children, className = '', ...props }) => { return (
{children}
); }; export interface QuestionnaireProgressProps { current: number; total: number; label?: string; tone?: 'primary' | 'luxury' | 'info' | 'success'; } export const QuestionnaireProgress: React.FC = ({ current, total, label, tone = 'luxury', }) => { const pct = Math.round((current / total) * 100); const displayLabel = label || `السؤال ${current} من ${total}`; return (
{displayLabel} {pct}%
); }; export interface QuestionnaireItemProps extends React.HTMLAttributes { category?: string; points?: number; title: string; description?: string; children: React.ReactNode; } export const QuestionnaireItem: React.FC = ({ category, points, title, description, children, className = '', ...props }) => { return (
{(category || points !== undefined) && (
{category && {category}} {points !== undefined && ( {points} درجات )}
)}

{title}

{description &&

{description}

}
{children}
); }; export interface QuestionnaireChoiceProps extends React.HTMLAttributes { shortcut?: string; selected?: boolean; correct?: boolean; wrong?: boolean; children: React.ReactNode; } export const QuestionnaireChoice: React.FC = ({ shortcut, selected = false, correct = false, wrong = false, children, className = '', ...props }) => { const classes = [ 'qhr-questionnaire-choice', selected ? 'is-selected' : '', correct ? 'is-correct' : '', wrong ? 'is-wrong' : '', className, ].filter(Boolean).join(' '); return (
{shortcut && {shortcut}} {children}
); }; export const QuestionnaireActions: React.FC> = ({ children, className = '', ...props }) => { return (
{children}
); };