import { useState } from "react"; import { Controller, useFormContext } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { FormGroup, Select, SelectOption, SelectVariant, Switch, } from "@patternfly/react-core"; import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation"; import { FormAccess } from "../../components/form-access/FormAccess"; import { HelpItem } from "../../components/help-enabler/HelpItem"; import { convertAttributeNameToForm } from "../../util"; export const Toggle = ({ name, label }: { name: string; label: string }) => { const { t } = useTranslation("clients"); const { control } = useFormContext(); return ( } > ( onChange(value.toString())} aria-label={t(label)} /> )} /> ); }; export const SamlConfig = () => { const { t } = useTranslation("clients"); const { control } = useFormContext(); const [nameFormatOpen, setNameFormatOpen] = useState(false); return ( } > ( )} /> ); };