'use client' import type { RatingOptions } from '@/lib/types' interface RatingScaleProps { name: string legend: string ratingOptions: RatingOptions value: number | undefined required: boolean onChange: (value: number) => void error?: string } export function RatingScale({ name, legend, ratingOptions, value, required, onChange, error, }: RatingScaleProps) { const { min, max, min_label, max_label } = ratingOptions const steps = Array.from({ length: max - min + 1 }, (_, i) => min + i) return (
) }