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

136 lines
5 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 11760
// Function ID: 11761
2026-07-20 16:05:17 +00:00
// Name: useDeactivateWarningText
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 4299, 1984, 1910, 589, 6965, 4269, 1236, 2368, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 11760 (useDeactivateWarningText)
import closure_3 from "noop" /* 19 */;
import closure_4 from "handleInviteData" /* 4299 */;
import closure_5 from "createGuildRoleRecordFromRust" /* 1984 */;
import closure_6 from "createGuildRecordFromRust" /* 1910 */;
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/useDeactivateWarningText.tsx");
2026-07-20 16:05:17 +00:00
export default function useDeactivateWarningText(arg0, skuId) {
2026-07-23 10:11:24 +00:00
const _require = arg0;
2026-08-24 06:08:38 +00:00
importDefault = skuId;
2026-07-23 10:11:24 +00:00
let items = [stateFromStores1];
stateFromStores = _require(stateFromStores[4]).useStateFromStores(items, () => stateFromStores1.getMemberCount(closure_0));
const tmp2 = importDefault(stateFromStores[5])(arg0);
2026-07-20 16:05:17 +00:00
const React = tmp2;
2026-07-23 10:11:24 +00:00
let obj = _require(stateFromStores[4]);
2026-08-24 06:08:38 +00:00
const items1 = [closure_6];
2026-07-23 10:11:24 +00:00
stateFromStores1 = _require(stateFromStores[4]).useStateFromStores(items1, () => {
2026-08-24 06:08:38 +00:00
const guild = closure_1_6.getGuild(closure_0);
2026-07-20 16:05:17 +00:00
let vanityURLCode;
2026-07-29 08:29:29 +00:00
if (guild != null) {
2026-07-20 16:05:17 +00:00
vanityURLCode = guild.vanityURLCode;
}
return null != vanityURLCode;
});
2026-07-23 10:11:24 +00:00
let obj2 = _require(stateFromStores[4]);
const items2 = [stateFromStores2];
2026-07-20 16:05:17 +00:00
const items3 = [arg0, skuId.skuId, tmp2];
2026-07-23 10:11:24 +00:00
stateFromStores2 = _require(stateFromStores[4]).useStateFromStores(items2, () => {
2026-07-20 16:05:17 +00:00
let num = 0;
2026-07-23 10:11:24 +00:00
if (skuId.skuId === callback(stateFromStores[6]).GUILD_POWERUP_ROLE_COLOR_SKU_ID) {
2026-07-20 16:05:17 +00:00
num = 0;
2026-08-24 06:08:38 +00:00
if (null != closure_3) {
2026-07-23 10:11:24 +00:00
const sortedRoles = stateFromStores2.getSortedRoles(callback);
2026-07-20 16:05:17 +00:00
num = sortedRoles.reduce((arg0, colorStrings) => {
colorStrings = colorStrings.colorStrings;
let secondaryColor;
2026-07-29 08:29:29 +00:00
if (colorStrings != null) {
2026-07-20 16:05:17 +00:00
secondaryColor = colorStrings.secondaryColor;
}
let sum = arg0;
if (null != secondaryColor) {
2026-07-29 08:29:29 +00:00
let num = table[colorStrings.id];
if (num == null) {
num = 0;
2026-07-20 16:05:17 +00:00
}
sum = arg0 + num;
}
return sum;
}, 0);
}
}
return num;
}, items3);
const items4 = [skuId, stateFromStores2, stateFromStores, stateFromStores1];
2026-07-23 10:11:24 +00:00
return React.useMemo(() => {
skuId = skuId.skuId;
if (callback(stateFromStores[6]).GUILD_POWERUP_ROLE_COLOR_SKU_ID === skuId) {
2026-07-20 16:05:17 +00:00
if (stateFromStores2 > 0) {
2026-07-29 08:29:29 +00:00
const intl5 = tmp2(tmp3[7]).intl;
let obj = { perk: null, memberCount: null };
obj[0] = tmp.title;
obj[1] = tmp14;
let formatToPlainStringResult = intl5.formatToPlainString(skuId(tmp3[8])["4jSvr1"], obj);
let tmp15 = skuId;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const intl4 = tmp2(tmp3[7]).intl;
tmp15 = skuId;
obj = { perk: null };
obj[0] = tmp.title;
formatToPlainStringResult = intl4.formatToPlainString(skuId(tmp3[8]).cavtEo, obj);
2026-07-20 16:05:17 +00:00
}
} else {
2026-07-29 08:29:29 +00:00
if (tmp2(tmp3[6]).VANITY_URL_POWERUP_SKU_ID === skuId) {
const intl3 = tmp2(tmp3[7]).intl;
2026-07-20 16:05:17 +00:00
const string = intl3.string;
2026-07-29 08:29:29 +00:00
const tmp11 = skuId(tmp3[8]);
2026-07-20 16:05:17 +00:00
if (stateFromStores1) {
2026-07-29 08:29:29 +00:00
let stringResult = string(tmp11.hN75yb);
let tmp13 = tmp10;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
stringResult = string(tmp11.Du91Rb);
tmp13 = tmp10;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp7 = tmp13;
2026-07-20 16:05:17 +00:00
let formatToPlainStringResult1 = stringResult;
} else {
2026-07-29 08:29:29 +00:00
if (tmp2(tmp3[6]).GUILD_TAGS_BADGE_PACK_PETS_POWERUP_SKU_ID !== skuId) {
if (tmp2(tmp3[6]).GUILD_TAGS_BADGE_PACK_FLEX_POWERUP_SKU_ID !== skuId) {
if (tmp2(tmp3[6]).GUILD_TAGS_BADGE_PACK_PLANT_POWERUP_SKU_ID !== skuId) {
if (tmp2(tmp3[6]).GUILD_TAGS_BADGE_PACK_CREEPY_CRAWLIES_POWERUP_SKU_ID !== skuId) {
const intl = tmp2(tmp3[7]).intl;
obj = { perk: null, memberCount: null };
obj[0] = tmp.title;
let num = stateFromStores;
if (stateFromStores == null) {
num = 0;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = num;
formatToPlainStringResult1 = intl.formatToPlainString(skuId(tmp3[8])["4jSvr1"], obj);
tmp7 = skuId;
const tmp4 = skuId;
2026-07-20 16:05:17 +00:00
}
}
}
}
2026-07-29 08:29:29 +00:00
const intl2 = tmp2(tmp3[7]).intl;
formatToPlainStringResult1 = intl2.string(skuId(tmp3[8]).Vf2ZcR);
tmp7 = skuId;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
obj1 = { text: null, critical: null };
2026-07-29 08:29:29 +00:00
obj1[0] = formatToPlainStringResult1;
obj1[1] = tmp.skuId === tmp2(tmp3[6]).VANITY_URL_POWERUP_SKU_ID;
2026-07-20 16:05:17 +00:00
const items = [obj1];
2026-07-29 08:29:29 +00:00
let tmp20 = stateFromStores1;
2026-07-20 16:05:17 +00:00
if (stateFromStores1) {
2026-07-29 08:29:29 +00:00
tmp20 = tmp.skuId === tmp2(tmp3[6]).GUILD_POWERUP_LEVEL_3_SKU_ID;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp20) {
const obj2 = { text: null, critical: true };
const intl6 = tmp2(tmp3[7]).intl;
obj2[0] = intl6.string(tmp7(tmp3[8]).M4XL5n);
2026-07-20 16:05:17 +00:00
items.push(obj2);
}
return items;
}
}, items4);
};