'use client'; import { QuestionParameterConfig } from '@/types/questionConfig'; import { SelectInput, RangeInput, TextInput, CheckboxInput } from './inputs'; interface ParameterInputProps { config: QuestionParameterConfig; value: string | number | boolean | string[]; onChange: (value: string | number | boolean | string[]) => void; className?: string; disabled?: boolean; } export default function ParameterInput({ config, value, onChange, className = '', disabled = false }: ParameterInputProps) { const { type, label, options, min, max, step, placeholder, helpText, key } = config; switch (type) { case 'select': return ( typeof option.value === 'string' || typeof option.value === 'number' ).map(option => ({ value: option.value as string | number, label: option.label }))} onChange={onChange} className={className} disabled={disabled} placeholder={placeholder} helpText={helpText} /> ); case 'range': return ( ); case 'text': return ( ); case 'textarea': return ( ); case 'checkbox': return ( ); default: return null; } }