import { assert } from "tsafe/assert"; import type { Attribute } from "@keycloakify/keycloak-login-ui/KcContext"; import { useI18n } from "../../i18n"; import { useKcClsx } from "@keycloakify/keycloak-login-ui/useKcClsx"; export function GroupLabel(props: { attribute: Attribute; groupNameRef: { current: string; }; }) { const { attribute, groupNameRef } = props; const { advancedMsg } = useI18n(); const { kcClsx } = useKcClsx(); if (attribute.group?.name !== groupNameRef.current) { groupNameRef.current = attribute.group?.name ?? ""; if (groupNameRef.current !== "") { assert(attribute.group !== undefined); return (