/* eslint-disable */ // @ts-nocheck import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation"; import { ActionGroup, Button, FormGroup, PageSection, Switch, } from "../../shared/@patternfly/react-core"; import { Controller, useFormContext, useWatch } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { FormPanel, HelpItem } from "../../shared/keycloak-ui-shared"; import { FormAccess } from "../components/form/FormAccess"; import { TimeSelector } from "../components/time-selector/TimeSelector"; import "./realm-settings-section.css"; type RealmSettingsSessionsTabProps = { realm: RealmRepresentation; save: (realm: RealmRepresentation) => void; }; export const RealmSettingsSessionsTab = ({ realm, save, }: RealmSettingsSessionsTabProps) => { const { t } = useTranslation(); const { control, handleSubmit, formState, reset } = useFormContext(); const offlineSessionMaxEnabled = useWatch({ control, name: "offlineSessionMaxLifespanEnabled", }); return ( } > ( )} /> } > ( )} /> {realm.rememberMe && ( <> } > ( )} /> } > ( )} /> )} } > ( )} /> } > ( )} /> } > ( )} /> } > ( )} /> } > ( )} /> {offlineSessionMaxEnabled && ( } > ( )} /> )} {offlineSessionMaxEnabled && ( } > ( )} /> )} } > ( )} /> } > ( )} /> ); };