import React, { useState } from "react"; import { useTranslation } from "react-i18next"; import { Controller, useFormContext, useWatch } from "react-hook-form"; import { FormGroup, Select, SelectOption, SelectVariant, } from "@patternfly/react-core"; import { ClientIdSecret } from "../component/ClientIdSecret"; import { HelpItem } from "../../components/help-enabler/HelpItem"; const clientAuthenticationTypes = [ "clientAuth_post", "clientAuth_basic", "clientAuth_secret_jwt", "clientAuth_privatekey_jwt", ]; export const OIDCAuthentication = () => { const { t } = useTranslation("identity-providers"); const { t: th } = useTranslation("identity-providers-help"); const { control } = useFormContext(); const [openClientAuth, setOpenClientAuth] = useState(false); const clientAuthMethod = useWatch({ control: control, name: "config.clientAuthMethod", }); return ( <> } fieldId="clientAuthentication" > ( )} /> ); };