import React from "react"; import { Controller, useFormContext } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { FormGroup, Switch } from "@patternfly/react-core"; import type { ComponentProps } from "./components"; import { HelpItem } from "../../../components/help-enabler/HelpItem"; export const BooleanComponent = ({ name, label, helpText, defaultValue, }: ComponentProps) => { const { t } = useTranslation("client-scopes"); const { control } = useFormContext(); return ( } > ( onChange("" + value)} /> )} /> ); };