import type { PageProps } from "keycloakify/login/pages/PageProps";
import type { KcContext } from "../KcContext";
import type { I18n } from "../i18n";

export default function QrLoginSuccess(
    props: PageProps<Extract<KcContext, { pageId: "qr-login-success.ftl" }>, I18n>
) {
    const { kcContext, i18n, doUseDefaultCss, Template, classes } = props;
    const { msg } = i18n;

    return (
        <Template
            kcContext={kcContext}
            i18n={i18n}
            doUseDefaultCss={doUseDefaultCss}
            classes={classes}
            displayInfo={false}
            headerNode={msg("successQrCodeLoginTitle")}
        >
            <div id="kc-qr-success-message" className={classes?.kcFormClass}>
                <p className="kcQrSuccessMessageClass">{msg("successQrCodeLoginMessage")}</p>
            </div>
        </Template>
    );
}
