decord/source/modules/premium/powerups/hooks/useGuildPowerupRollbackModalConfig.tsx

77 lines
2.8 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 12072
// Function ID: 12073
2026-07-20 16:05:17 +00:00
// Name: useGuildPowerupRollbackModalConfig
2026-08-25 06:04:03 +00:00
// Dependencies: [19, 1910, 4266, 589, 12073, 4270, 12058, 12060, 1377, 1236, 2369, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 12072 (useGuildPowerupRollbackModalConfig)
2026-08-24 06:08:38 +00:00
import closure_3 from "noop" /* 19 */;
import closure_4 from "createGuildRecordFromRust" /* 1910 */;
2026-08-25 06:04:03 +00:00
import closure_5 from "calculateAppliedBoosts" /* 4266 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/premium/powerups/hooks/useGuildPowerupRollbackModalConfig.tsx");
2026-07-20 16:05:17 +00:00
export default function useGuildPowerupRollbackModalConfig(guildId, location) {
2026-07-23 10:11:24 +00:00
const _require = guildId;
let obj = _require(storeRemovalDate[3]);
2026-08-24 06:08:38 +00:00
let items = [closure_4];
const stateFromStores = obj.useStateFromStores(items, () => closure_1_4.getGuild(closure_0));
2026-07-29 08:29:29 +00:00
let flag = importDefault(storeRemovalDate[4])(guildId);
if (flag == null) {
flag = false;
}
let tmpResult = tmp(tmp2[3]);
2026-08-24 06:08:38 +00:00
const items1 = [closure_5];
const stateFromStores1 = tmpResult.useStateFromStores(items1, () => closure_1_5.getStateForGuild(closure_0));
2026-07-20 16:05:17 +00:00
let tmp5;
2026-07-29 08:29:29 +00:00
if (stateFromStores1 != null) {
2026-07-20 16:05:17 +00:00
const allPowerups = stateFromStores1.allPowerups;
2026-07-29 08:29:29 +00:00
if (allPowerups != null) {
tmp5 = allPowerups[tmp(undefined, tmp2[5]).GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID];
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
importDefault = tmp5;
storeRemovalDate = undefined;
2026-07-29 08:29:29 +00:00
if (tmp5 != null) {
2026-07-20 16:05:17 +00:00
storeRemovalDate = tmp5.storeRemovalDate;
}
2026-07-29 08:29:29 +00:00
tmpResult = tmp(tmp2[6]);
if (flag) {
flag = tmpResult.useShouldShowFileUploadRollback(guildId, location);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (flag) {
flag = null != stateFromStores;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const items2 = [flag, tmp5, storeRemovalDate];
2026-07-20 16:05:17 +00:00
obj = {
2026-07-29 08:29:29 +00:00
shouldShow: flag,
modalConfig: flag.useMemo(() => {
if (flag) {
2026-08-24 06:08:38 +00:00
if (null != callback) {
2026-07-20 16:05:17 +00:00
if (null != storeRemovalDate) {
2026-08-24 06:08:38 +00:00
const tmp6 = callback(storeRemovalDate[7])(tmp3);
2026-07-29 08:29:29 +00:00
let obj = { dismissibleContent: null, header: null, bodies: null, hasCancelButton: false };
obj[0] = guildId(storeRemovalDate[8]).DismissibleContent.FILE_UPLOAD_POWERUP_ROLLBACK_MODAL;
2026-07-23 10:11:24 +00:00
const intl = guildId(storeRemovalDate[9]).intl;
2026-07-29 08:29:29 +00:00
obj = { dateString: null };
obj[0] = tmp6;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
2026-08-24 06:08:38 +00:00
obj[1] = "" + tmp.title + " " + intl.formatToPlainString(callback(storeRemovalDate[10])["6e2ry1"], obj);
2026-07-23 10:11:24 +00:00
const intl2 = guildId(storeRemovalDate[9]).intl;
2026-07-29 08:29:29 +00:00
obj = { startDate: null, endDate: null, perkName: null, boostCount: null };
obj[0] = tmp6;
obj[1] = tmp6;
({ title: obj3[2], cost: obj3[3] } = tmp);
2026-08-24 06:08:38 +00:00
const items = [intl2.formatToPlainString(callback(storeRemovalDate[10]).jd8fki, obj)];
2026-07-29 08:29:29 +00:00
obj[2] = items;
2026-07-20 16:05:17 +00:00
return obj;
}
}
}
return null;
}, items2)
};
return obj;
};