import { Select, SelectOption } from "@patternfly/react-core"; import { useState } from "react"; import { Controller, useFormContext } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { Options } from "../UserProfileFields"; import { DEFAULT_ROLES, fieldName } from "../utils"; import { UserProfileFieldsProps, UserProfileGroup } from "./UserProfileGroup"; export const SelectComponent = ({ roles = [], ...attribute }: UserProfileFieldsProps) => { const { t } = useTranslation("users"); const { control } = useFormContext(); const [open, setOpen] = useState(false); const isMultiSelect = attribute.annotations?.["inputType"] === "multiselect"; const options = (attribute.validations?.options as Options).options || []; return ( ( )} /> ); };