/* eslint-disable */ // @ts-nocheck import { FormGroup, Switch } from "../../../shared/@patternfly/react-core"; import { Controller, FormProvider, useFormContext } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { HelpItem, TextControl } from "../../../shared/keycloak-ui-shared"; export const SyncSettings = () => { const { t } = useTranslation(); const form = useFormContext(); const { control, watch } = form; const watchPeriodicSync = watch("config.fullSyncPeriod", "-1"); const watchChangedSync = watch("config.changedSyncPeriod", "-1"); return ( } fieldId="kc-periodic-full-sync" hasNoPaddingTop > ( { field.onChange(value ? "604800" : "-1"); }} isChecked={field.value !== "-1"} label={t("on")} labelOff={t("off")} aria-label={t("periodicFullSync")} /> )} /> {watchPeriodicSync !== "-1" && ( )} } fieldId="kc-periodic-changed-users-sync" hasNoPaddingTop > ( { field.onChange(value ? "86400" : "-1"); }} isChecked={field.value !== "-1"} label={t("on")} labelOff={t("off")} aria-label={t("periodicChangedUsersSync")} /> )} /> {watchChangedSync !== "-1" && ( )} ); };