/* eslint-disable */ // @ts-nocheck import { FormGroup, Switch } from "../../../shared/@patternfly/react-core"; import { Controller, FormProvider, UseFormReturn, useWatch, } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { HelpItem, TextControl } from "../../../shared/keycloak-ui-shared"; import { FormAccess } from "../../components/form/FormAccess"; import { WizardSectionHeader } from "../../components/wizard-section-header/WizardSectionHeader"; export type LdapSettingsKerberosIntegrationProps = { form: UseFormReturn; showSectionHeading?: boolean; showSectionDescription?: boolean; }; export const LdapSettingsKerberosIntegration = ({ form, showSectionHeading = false, showSectionDescription = false, }: LdapSettingsKerberosIntegrationProps) => { const { t } = useTranslation(); const allowKerberosAuth: [string] = useWatch({ control: form.control, name: "config.allowKerberosAuthentication", defaultValue: ["false"], }); return ( {showSectionHeading && ( )} } fieldId="kc-allow-kerberos-authentication" hasNoPaddingTop > ( field.onChange([`${value}`])} isChecked={field.value[0] === "true"} label={t("on")} labelOff={t("off")} aria-label={t("allowKerberosAuthentication")} /> )} > {allowKerberosAuth[0] === "true" && ( <> } fieldId="kc-debug" hasNoPaddingTop > ( field.onChange([`${value}`])} isChecked={field.value[0] === "true"} label={t("on")} labelOff={t("off")} aria-label={t("debug")} /> )} /> )} } fieldId="kc-use-kerberos-password-authentication" hasNoPaddingTop > ( field.onChange([`${value}`])} isChecked={field.value[0] === "true"} label={t("on")} labelOff={t("off")} aria-label={t("useKerberosForPasswordAuthentication")} /> )} > ); };