import React, { useState } from "react"; import { useTranslation } from "react-i18next"; import { Controller, useFormContext } from "react-hook-form"; import { ActionGroup, Button, ClipboardCopy, FormGroup, PageSection, Select, SelectOption, SelectVariant, Stack, StackItem, Switch, TextInput, } from "@patternfly/react-core"; import RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation"; import { getBaseUrl } from "../util"; import { useAdminClient } from "../context/auth/AdminClient"; import { useRealm } from "../context/realm-context/RealmContext"; import { FormAccess } from "../components/form-access/FormAccess"; import { HelpItem } from "../components/help-enabler/HelpItem"; import { FormattedLink } from "../components/external-link/FormattedLink"; type RealmSettingsGeneralTabProps = { save: (realm: RealmRepresentation) => void; reset: () => void; }; export const RealmSettingsGeneralTab = ({ save, reset, }: RealmSettingsGeneralTabProps) => { const { t } = useTranslation("realm-settings"); const adminClient = useAdminClient(); const { realm: realmName } = useRealm(); const { register, control, handleSubmit } = useFormContext(); const [open, setOpen] = useState(false); const baseUrl = getBaseUrl(adminClient); const requireSslTypes = ["all", "external", "none"]; return ( <> {realmName} } > } > ( )} /> } fieldId="kc-user-manged-access" > ( )} /> } fieldId="kc-endpoints" > ); };