import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation"; import { ActionGroup, Button, FormGroup, PageSection, Select, SelectOption, SelectVariant, } from "@patternfly/react-core"; import { useEffect, useState } from "react"; import { Controller, useForm } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { FormAccess } from "../components/form-access/FormAccess"; import { HelpItem } from "../components/help-enabler/HelpItem"; import { useServerInfo } from "../context/server-info/ServerInfoProvider"; import { convertToFormValues } from "../util"; type RealmSettingsThemesTabProps = { realm: RealmRepresentation; save: (realm: RealmRepresentation) => void; }; export const RealmSettingsThemesTab = ({ realm, save, }: RealmSettingsThemesTabProps) => { const { t } = useTranslation("realm-settings"); const [loginThemeOpen, setLoginThemeOpen] = useState(false); const [accountThemeOpen, setAccountThemeOpen] = useState(false); const [adminUIThemeOpen, setAdminUIThemeOpen] = useState(false); const [emailThemeOpen, setEmailThemeOpen] = useState(false); const { control, handleSubmit, setValue } = useForm(); const themeTypes = useServerInfo().themes!; const setupForm = () => { convertToFormValues(realm, setValue); }; useEffect(setupForm, []); return ( } > ( )} /> } > ( )} /> } > ( )} /> } > ( )} /> ); };