{t('tool.question')}
[{clampedStep + 1}/{total}]
{error ? (
{error}
) : null}
{questions.length === 0 ? (
{t('tool.askUserQuestion.fallback')}
) : (
{questions[clampedStep]?.header ? (
{questions[clampedStep].header}
) : null}
{questions[clampedStep]?.question ? (
) : null}
{questions[clampedStep].options.map((opt, optIdx) => {
const selected = (selectedByQuestion[clampedStep] ?? []).includes(optIdx)
return (
toggleOption(clampedStep, optIdx)}
/>
)
})}
toggleOther(clampedStep)}
/>
{(otherSelectedByQuestion[clampedStep] ?? false) ? (
)}
{questions.length > 1 ? (
) : null}
{questions.length > 1 && clampedStep < questions.length - 1 ? (
) : (
)}
)
}