'use client'
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var _tslib = require('../../../../_virtual/_tslib.cjs');
var jsxRuntime = require('react/jsx-runtime');
var CaptchaChallenge = require('../../components/CaptchaChallenge/CaptchaChallenge.cjs');
var CaptchaContext = require('../../context/CaptchaContext/CaptchaContext.cjs');

const CaptchaVerifyUser = () => {
    const { captchaAuthState, setCaptchaToken } = CaptchaContext.useCaptchaContext();
    const handleSuccess = (captchaToken) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
        var _a;
        setCaptchaToken(captchaToken);
        yield ((_a = captchaAuthState === null || captchaAuthState === void 0 ? void 0 : captchaAuthState.onCaptchaSuccess) === null || _a === void 0 ? void 0 : _a.call(captchaAuthState, captchaToken));
    });
    return jsxRuntime.jsx(CaptchaChallenge.CaptchaChallenge, { onSuccess: handleSuccess });
};

exports.CaptchaVerifyUser = CaptchaVerifyUser;
