"use strict";
'use client';
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = CallbackUrlSetter;
const tslib_1 = require("tslib");
const js_cookie_1 = tslib_1.__importDefault(require("js-cookie"));
const navigation_1 = require("next/navigation");
const react_1 = require("react");
function CallbackUrlSetter({ path }) {
    const searchParams = (0, navigation_1.useSearchParams)();
    (0, react_1.useEffect)(() => {
        const callbackUrl = encodeURIComponent(path + '?' + searchParams.toString());
        js_cookie_1.default.set('callbackUrl', callbackUrl, { expires: 1, path: '/' });
    }, [path, searchParams]);
    return null;
}
//# sourceMappingURL=CallbackUrlSetter.js.map