/* eslint-disable */ // @ts-nocheck import { HelpItem, KeycloakSelect, SelectVariant, } from "../../../shared/keycloak-ui-shared"; import { FormGroup, SelectOption } from "../../../shared/@patternfly/react-core"; import { useState } from "react"; import { Controller, useFormContext } from "react-hook-form"; import { useTranslation } from "react-i18next"; import type { ComponentProps } from "./components"; export const ListComponent = ({ name, label, helpText, defaultValue, options, required, isDisabled = false, convertToName, }: ComponentProps) => { const { t } = useTranslation(); const { control } = useFormContext(); const [open, setOpen] = useState(false); return ( } fieldId={name!} isRequired={required} > ( setOpen(toggle)} onSelect={(value) => { field.onChange(value as string); setOpen(false); }} selections={field.value} variant={SelectVariant.single} aria-label={t(label!)} isOpen={open} > {options?.map((option) => ( {option} ))} )} /> ); };