/* eslint-disable */ // @ts-nocheck import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation"; import { SelectControl } from "../../../shared/keycloak-ui-shared"; import { ActionGroup, Button, PageSection } from "../../../shared/@patternfly/react-core"; import { useEffect } from "react"; import { FormProvider, useForm } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { FormAccess } from "../../components/form/FormAccess"; import { DefaultSwitchControl } from "../../components/SwitchControl"; import { useServerInfo } from "../../context/server-info/ServerInfoProvider"; import { convertToFormValues } from "../../util"; type ThemeSettingsTabProps = { realm: RealmRepresentation; save: (realm: RealmRepresentation) => void; }; export const ThemeSettingsTab = ({ realm, save }: ThemeSettingsTabProps) => { const { t } = useTranslation(); const form = useForm(); const { handleSubmit, setValue } = form; const themeTypes = useServerInfo().themes!; const setupForm = () => { convertToFormValues(realm, setValue); }; useEffect(setupForm, []); const appendEmptyChoice = (items: { key: string; value: string }[]) => [ { key: "", value: t("choose") }, ...items, ]; return ( ({ key: theme.name, value: theme.name, description: theme.description, })), )} /> ({ key: theme.name, value: theme.name, description: theme.description, })), )} /> ({ key: theme.name, value: theme.name, description: theme.description, })), )} /> ({ key: theme.name, value: theme.name, description: theme.description, })), )} /> ); };