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

71 lines
2.6 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 11715
// Function ID: 11716
2026-07-20 16:05:17 +00:00
// Name: useGuildPowerupRollbackNotificationConfig
2026-08-24 06:08:38 +00:00
// Dependencies: [4265, 589, 4269, 11716, 1377, 1236, 2368, 11718, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 11715 (useGuildPowerupRollbackNotificationConfig)
import messagesProxyDefault from "messagesProxy" /* 2368 */;
import getGuildPowerupFormattedDateStringDefault from "getGuildPowerupFormattedDateString" /* 11718 */;
import closure_3 from "calculateAppliedBoosts" /* 4265 */;
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/useGuildPowerupRollbackNotificationConfig.tsx");
2026-07-20 16:05:17 +00:00
export default function useGuildPowerupRollbackNotificationConfig(guildId, location) {
2026-07-23 10:11:24 +00:00
const _require = guildId;
2026-07-29 08:29:29 +00:00
let obj = _require(589);
2026-08-24 06:08:38 +00:00
const items = [closure_3];
const stateFromStores = obj.useStateFromStores(items, () => closure_1_3.getStateForGuild(closure_0));
2026-07-29 08:29:29 +00:00
let tmp4;
if (stateFromStores != null) {
2026-08-24 06:08:38 +00:00
tmp4 = stateFromStores.allPowerups[tmp(undefined, 4269).GUILD_POWERUP_MAX_FILE_SIZE_250_MB_SKU_ID];
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp4 != null) {
const storeRemovalDate = tmp4.storeRemovalDate;
2026-07-20 16:05:17 +00:00
}
let tmp5 = null;
2026-07-29 08:29:29 +00:00
if (tmpResult.useShouldShowFileUploadRollback(guildId, location)) {
2026-07-20 16:05:17 +00:00
tmp5 = null;
if (null != storeRemovalDate) {
let title;
2026-07-29 08:29:29 +00:00
if (tmp4 != null) {
title = tmp4.title;
2026-07-20 16:05:17 +00:00
}
tmp5 = null;
if (null != title) {
let cost;
2026-07-29 08:29:29 +00:00
if (tmp4 != null) {
cost = tmp4.cost;
2026-07-20 16:05:17 +00:00
}
tmp5 = null;
if (null != cost) {
2026-07-29 08:29:29 +00:00
obj = { dismissibleContent: null, title: null, description: null };
2026-08-11 06:20:06 +00:00
obj[0] = tmp(1377).DismissibleContent.FILE_UPLOAD_POWERUP_ROLLBACK_NOTIFICATION;
2026-07-29 08:29:29 +00:00
const intl = tmp(1236).intl;
obj = { dateString: null };
2026-08-24 06:08:38 +00:00
obj[0] = getGuildPowerupFormattedDateStringDefault(storeRemovalDate);
obj[1] = intl.formatToPlainString(messagesProxyDefault["6e2ry1"], obj);
2026-07-29 08:29:29 +00:00
const intl2 = tmp(1236).intl;
2026-08-24 06:08:38 +00:00
obj1 = { startDate: null, endDate: null, perkName: null, boostCount: null };
obj1[0] = getGuildPowerupFormattedDateStringDefault(storeRemovalDate);
obj1[1] = getGuildPowerupFormattedDateStringDefault(storeRemovalDate);
2026-07-20 16:05:17 +00:00
let title1;
2026-07-29 08:29:29 +00:00
if (tmp4 != null) {
title1 = tmp4.title;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj1[2] = title1;
2026-07-20 16:05:17 +00:00
let cost1;
2026-07-29 08:29:29 +00:00
if (tmp4 != null) {
cost1 = tmp4.cost;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj1[3] = cost1;
2026-08-24 06:08:38 +00:00
obj[2] = intl2.formatToPlainString(messagesProxyDefault.jd8fki, obj1);
2026-07-20 16:05:17 +00:00
tmp5 = obj;
}
}
}
}
return tmp5;
};