decord/source/modules/collectibles/profile_effects/useProfileEffectSections.tsx

75 lines
3.1 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 14117
// Function ID: 14118
2026-07-20 16:05:17 +00:00
// Name: useProfileEffectSections
2026-08-24 06:08:38 +00:00
// Dependencies: [32, 19, 5306, 5329, 647, 5318, 1236, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 14117 (useProfileEffectSections)
import closure_2 from "_slicedToArray" /* 32 */;
import { useMemo } from "noop" /* 19 */;
import closure_4 from "updateCategoriesAndProducts" /* 5306 */;
import closure_5 from "map" /* 5329 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
let obj = { PURCHASE: "purchase", PREMIUM_PURCHASE: "premium_purchase", PREVIEW: "preview" };
obj = { skuId: "None" };
obj = { skuId: "Shop" };
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/collectibles/profile_effects/useProfileEffectSections.tsx");
2026-07-20 16:05:17 +00:00
export default function useProfileEffectSections() {
2026-08-24 06:08:38 +00:00
let items = [closure_5];
2026-07-29 08:29:29 +00:00
stateFromStores = stateFromStores(first[4]).useStateFromStores(items, () => purchases.purchases);
2026-08-24 06:08:38 +00:00
obj = stateFromStores(first[4]);
let items1 = [closure_4];
2026-07-23 10:11:24 +00:00
const tmp2 = callback(stateFromStores(first[4]).useStateFromStoresArray(items1, () => {
2026-07-20 16:05:17 +00:00
const items = [, ];
2026-08-24 06:08:38 +00:00
({ categories: arr[0], products: arr[1] } = closure_4);
2026-07-20 16:05:17 +00:00
return items;
}), 2);
2026-07-23 10:11:24 +00:00
first = tmp2[0];
callback = tmp4;
2026-07-20 16:05:17 +00:00
const items2 = [first, tmp2[1], stateFromStores];
return useMemo(() => {
2026-08-24 06:08:38 +00:00
obj = stateFromStores(first[5]);
2026-07-20 16:05:17 +00:00
const profileEffects = obj.getProfileEffects(stateFromStores, first);
const reduced = profileEffects.reduce((premium_purchase, skuId) => {
2026-07-29 08:29:29 +00:00
const value = closure_0.get(skuId.skuId);
2026-07-20 16:05:17 +00:00
if (null != value) {
2026-08-24 06:08:38 +00:00
let result = closure_1_0(closure_1_1[5]).isPremiumCollectiblesPurchase(value);
const obj2 = closure_1_0(closure_1_1[5]);
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
result = closure_1_0(closure_1_1[5]).isPremiumCollectiblesProduct(closure_2.get(skuId.skuId));
obj = closure_1_0(closure_1_1[5]);
2026-07-20 16:05:17 +00:00
}
if (result) {
premium_purchase = premium_purchase.premium_purchase;
premium_purchase.push(skuId);
} else if (null != value) {
const purchase = premium_purchase.purchase;
purchase.push(skuId);
} else {
const preview = premium_purchase.preview;
preview.push(skuId);
}
return premium_purchase;
}, { purchase: [], premium_purchase: [], preview: [] });
2026-08-24 06:08:38 +00:00
obj = { section: closure_1_6.PURCHASE, items, height: 12, header: null };
items = [closure_1_7, closure_1_8, ...reduced.purchase];
2026-07-20 16:05:17 +00:00
const intl = stateFromStores(first[6]).intl;
2026-07-29 08:29:29 +00:00
obj[3] = intl.string(stateFromStores(first[6]).t["9x1v/p"]);
2026-07-20 16:05:17 +00:00
const items1 = [obj, , ];
2026-08-24 06:08:38 +00:00
obj = { section: closure_1_6.PREMIUM_PURCHASE, items: reduced.premium_purchase, height: 12, header: null };
2026-07-20 16:05:17 +00:00
const intl2 = stateFromStores(first[6]).intl;
2026-07-29 08:29:29 +00:00
obj[3] = intl2.string(stateFromStores(first[6]).t.TiLCgw);
2026-07-20 16:05:17 +00:00
items1[1] = obj;
2026-08-24 06:08:38 +00:00
obj1 = { section: closure_1_6.PREVIEW, items: reduced.preview, height: 12, header: null };
2026-07-20 16:05:17 +00:00
const intl3 = stateFromStores(first[6]).intl;
2026-07-29 08:29:29 +00:00
obj1[3] = intl3.string(stateFromStores(first[6]).t["1vbbee"]);
2026-07-20 16:05:17 +00:00
items1[2] = obj1;
return items1.filter((items) => items.items.length > 0);
}, items2);
};
export const Section = obj;
export const NONE_ITEM = obj;
export const SHOP_ITEM = obj;