/* eslint-disable */ // @ts-nocheck import { MenuToggle, MenuToggleStatus, Select, SelectList, SelectOption, } from "../../../@patternfly/react-core"; import { get } from "lodash-es"; import { useState } from "react"; import { Controller, FieldPath, FieldValues, useFormContext, } from "react-hook-form"; import { getRuleValue } from "../../utils/getRuleValue"; import { FormLabel } from "../FormLabel"; import { SelectControlProps, isSelectBasedOptions, isString, key, } from "./SelectControl"; export const SingleSelectControl = < T extends FieldValues, P extends FieldPath = FieldPath, >({ id, name, label, options, selectedOptions = [], controller, labelIcon, isDisabled, isFullWidth = true, onSelect, ...rest }: SelectControlProps) => { const { control, formState: { errors }, } = useFormContext(); const [open, setOpen] = useState(false); const required = getRuleValue(controller.rules?.required) === true; return ( ( )} /> ); };