import { FieldComponent } from '../../form/types'
import { RawMultiselectField } from './RawMultiselectField'
import { useSelectOptions } from './use-select-options'

export const MultiselectField: FieldComponent<string[], Record<string, never>> = (props) => {
  const [options, isLoading] = useSelectOptions(props.variable)
  return <RawMultiselectField {...props} options={options} isLoading={isLoading} />
}
