import { FormGroup, Switch } from "@patternfly/react-core"; import { useTranslation } from "react-i18next"; import React from "react"; import { HelpItem } from "../../components/help-enabler/HelpItem"; import { UseFormMethods, Controller } from "react-hook-form"; import { FormAccess } from "../../components/form-access/FormAccess"; import { WizardSectionHeader } from "../../components/wizard-section-header/WizardSectionHeader"; export type LdapSettingsAdvancedProps = { form: UseFormMethods; showSectionHeading?: boolean; showSectionDescription?: boolean; }; export const LdapSettingsAdvanced = ({ form, showSectionHeading = false, showSectionDescription = false, }: LdapSettingsAdvancedProps) => { const { t } = useTranslation("user-federation"); const helpText = useTranslation("user-federation-help").t; return ( <> {showSectionHeading && ( )} } fieldId="kc-enable-ldapv3-password" hasNoPaddingTop > ( onChange([`${value}`])} isChecked={value[0] === "true"} label={t("common:on")} labelOff={t("common:off")} /> )} > } fieldId="kc-validate-password-policy" hasNoPaddingTop > ( onChange([`${value}`])} isChecked={value[0] === "true"} label={t("common:on")} labelOff={t("common:off")} /> )} > } fieldId="kc-trust-email" hasNoPaddingTop > ( onChange([`${value}`])} isChecked={value[0] === "true"} label={t("common:on")} labelOff={t("common:off")} /> )} > ); };