"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getOldCampaignIds = exports.generateAnonymousId = void 0;
const numberOfMonths = 3;
const millisecondsInAMonth = 30 * 24 * 60 * 60 * 1000;
const generateAnonymousId = () => {
    return "anonymous_id_" + (Math.floor(Math.random() * 20) + 1);
};
exports.generateAnonymousId = generateAnonymousId;
const getOldCampaignIds = (campaigns) => {
    const timeAgo = Date.now() - numberOfMonths * millisecondsInAMonth;
    return Object.entries(campaigns)
        .filter(([_, timestamp]) => timestamp < timeAgo)
        .map(([id, _]) => id);
};
exports.getOldCampaignIds = getOldCampaignIds;
//# sourceMappingURL=anonymousUsers.js.map