decord/source/modules/premium/gifting/GiftPromotionStore.tsx

60 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 7429
// Function ID: 7430
2026-07-29 08:29:29 +00:00
// Name: initialize
// Dependencies: [589, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
// Module 7429 (initialize)
import initializeDefault from "initialize" /* 589 */;
import dispatcherDefault from "dispatcher" /* 709 */;
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
let closure_0 = { giftOptionsReceiptMap: {} };
2026-08-24 06:08:38 +00:00
const PersistedStore = initializeDefault.PersistedStore;
2026-07-29 08:29:29 +00:00
class GiftPromotionStore extends PersistedStore {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = GiftPromotionStore.prototype;
prototype["initialize"] = function initialize(giftOptionsReceiptMap) {
if (null != giftOptionsReceiptMap) {
const obj = {};
const merged = Object.assign(giftOptionsReceiptMap.giftOptionsReceiptMap);
closure_0.giftOptionsReceiptMap = obj;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
};
prototype["getState"] = function getState() {
return closure_0;
};
2026-08-11 06:20:06 +00:00
prototype["getGiftOptionsForKey"] = function getGiftOptionsForKey(v3Result) {
return closure_0.giftOptionsReceiptMap[v3Result];
2026-07-29 08:29:29 +00:00
};
GiftPromotionStore.displayName = "GiftPromotionStore";
GiftPromotionStore.persistKey = "GiftPromotionStore";
const items = [
2026-07-20 16:05:17 +00:00
(giftOptionsReceiptMap) => {
let tmp = giftOptionsReceiptMap;
if (null != giftOptionsReceiptMap) {
2026-07-29 08:29:29 +00:00
let prop = giftOptionsReceiptMap.giftOptionsReceiptMap;
if (prop == null) {
prop = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj = { giftOptionsReceiptMap: null };
obj[0] = prop;
2026-07-20 16:05:17 +00:00
tmp = obj;
}
return tmp;
}
];
2026-07-29 08:29:29 +00:00
GiftPromotionStore.migrations = items;
2026-08-24 06:08:38 +00:00
const giftPromotionStore = new GiftPromotionStore(dispatcherDefault, {
2026-07-20 16:05:17 +00:00
LOGOUT: function handleLogout() {
2026-08-24 06:08:38 +00:00
closure_0 = { giftOptionsReceiptMap: {} };
2026-07-20 16:05:17 +00:00
},
GIFT_PROMOTION_GIFT_OPTIONS_CACHE_ACTION: function handleCacheGiftOptions(key) {
2026-07-29 08:29:29 +00:00
closure_0.giftOptionsReceiptMap[key.key] = key.giftOptions;
2026-07-20 16:05:17 +00:00
},
GIFT_PROMOTION_GIFT_OPTIONS_CLEAR_CACHE_ACTION: function handleClearCachedGiftOptions(arg0) {
2026-07-23 10:11:24 +00:00
delete tmp[tmp2];
2026-07-20 16:05:17 +00:00
}
});
2026-07-29 08:29:29 +00:00
const result = require("set").fileFinishedImporting("modules/premium/gifting/GiftPromotionStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default giftPromotionStore;