import { Fragment, type ComponentProps } from 'react' import { Select, SelectContent, SelectItem, SelectSeparator, SelectTrigger } from 'ui' import type { OnboardingSurveyOption } from './OnboardingSurvey.constants' type OnboardingSurveySelectProps = Omit< ComponentProps, 'value' | 'children' | 'className' > & { value: string onValueChange: (value: string) => void options: readonly OnboardingSurveyOption[] placeholder?: string } /** * Single-choice survey question. The trigger shows only the selected label; * the list puts opt-out answers (Prefer not to say) below a divider. * Other props go to the trigger: FormControl passes the id that ties it to its label. */ export function OnboardingSurveySelect({ value, onValueChange, options, placeholder = 'Select an option', ...triggerProps }: OnboardingSurveySelectProps) { const selectedOption = options.find((option) => option.value === value) return ( ) }