"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = saveCookiesClient;
const constants_1 = require("../../utils/constants");
const helpers_1 = require("../../helpers/helpers");
const sessionStore_1 = require("./sessionStore");
const save_local_storage_1 = require("./save-local-storage");
async function saveCookiesClient({ 
//@ts-ignore
remember = true, value, }) {
    // update data session
    const current = (0, sessionStore_1.getSession)() || {};
    const newSession = { ...current, ...value };
    (0, sessionStore_1.setSession)(newSession);
    const encrypted = (0, helpers_1.encryptDataSync)(newSession);
    (0, save_local_storage_1.saveLocalStorage)({
        key: constants_1.COOKIE_SESSION_SIGN_IN,
        value: encrypted,
    });
}
//# sourceMappingURL=saveCookiesClient.js.map