2026-09-12 13:45:10 +00:00
|
|
|
// Module ID: 12686
|
|
|
|
|
// Function ID: 12687
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useGuildPowerupExpiringNotificationsConfig
|
2026-09-12 13:45:10 +00:00
|
|
|
// Dependencies: [12687, 12688, 1114, 2850, 4529, 2428, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-09-12 13:45:10 +00:00
|
|
|
// Module 12686 (useGuildPowerupExpiringNotificationsConfig)
|
2026-09-10 05:38:07 +00:00
|
|
|
import util from "util" /* 1114 */;
|
2026-09-12 13:45:10 +00:00
|
|
|
import Powerups from "Powerups" /* 4529 */;
|
|
|
|
|
import useGetExpiringGuildPowerupsDefault from "useGetExpiringGuildPowerups" /* 12687 */;
|
|
|
|
|
import useGameServerGetExpiringEntitlementsDefault from "useGameServerGetExpiringEntitlements" /* 12688 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-08-24 06:08:38 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const result = size.fileFinishedImporting("modules/premium/powerups/hooks/useGuildPowerupExpiringNotificationsConfig.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function useGuildPowerupExpiringNotificationsConfig(arg0) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const arr = useGetExpiringGuildPowerupsDefault(arg0);
|
2026-08-24 06:08:38 +00:00
|
|
|
const arr2 = useGameServerGetExpiringEntitlementsDefault(arg0);
|
2026-07-20 16:05:17 +00:00
|
|
|
if (arr.length > 0 || arr2.length > 0) {
|
|
|
|
|
let stringResult;
|
|
|
|
|
if (arr2.length > 0) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const intl = util.intl;
|
2026-09-05 10:56:28 +00:00
|
|
|
stringResult = intl.string(tmp(2850)["B3OfL/"]);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
const items = [];
|
2026-09-10 05:38:07 +00:00
|
|
|
const arraySpreadResult = HermesBuiltin.arraySpread(arr.map((title) => title.title), 0);
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null != stringResult) {
|
|
|
|
|
const items1 = [stringResult];
|
|
|
|
|
let items2 = items1;
|
|
|
|
|
} else {
|
|
|
|
|
items2 = [];
|
|
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
HermesBuiltin.arraySpread(items2, arraySpreadResult);
|
2026-07-20 16:05:17 +00:00
|
|
|
const items3 = [];
|
2026-09-10 05:38:07 +00:00
|
|
|
if (arr.some((skuId) => skuId.skuId === Powerups.VANITY_URL_POWERUP_SKU_ID)) {
|
|
|
|
|
const intl2 = util.intl;
|
|
|
|
|
items3.push(intl2.string(tmp(2428).Sfr0Jw));
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
if (arr2.length > 0) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const intl3 = util.intl;
|
|
|
|
|
items3.push(intl3.string(tmp(2850).wiungr));
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj2 = { shouldShow: tmp3, expiringPowerups: arr, expiringPowerupNames: items, warnings: items3 };
|
|
|
|
|
return obj2;
|
2026-07-20 16:05:17 +00:00
|
|
|
} else {
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj = { shouldShow: false, expiringPowerups: [], expiringPowerupNames: [], warnings: [] };
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
|
|
|
|
}
|
|
|
|
|
};
|