import { useState, memo } from "react"; import { Template } from "./Template"; import type { KcPagesProperties } from "./KcProperties"; import { defaultKcPagesProperties } from "./KcProperties"; import { assert } from "../tools/assert"; import { kcContext } from "../kcContext"; import { useKcTranslation } from "../i18n/useKcTranslation"; import { cx } from "tss-react"; export type RegisterPageProps = { kcProperties?: KcPagesProperties; }; export const Register = memo((props: RegisterPageProps) => { const { kcProperties = {} } = props; const { t, tStr } = useKcTranslation(); Object.assign(kcProperties, defaultKcPagesProperties); const [{ url, messagesPerField, register, realm, passwordRequired, recaptchaRequired, recaptchaSiteKey }] = useState(() => { assert( kcContext !== undefined && kcContext.pageBasename === "register.ftl" ); return kcContext; }); return (