Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
159 lines
8.6 KiB
TypeScript
159 lines
8.6 KiB
TypeScript
// Module ID: 12550
|
|
// Function ID: 12551
|
|
// Name: GuildPowerupsModal
|
|
// Dependencies: [19, 17, 4495, 21, 4605, 576, 4518, 12551, 12561, 12581, 1611, 7214, 12586, 12587, 12616, 4808, 4514, 5681, 1114, 2428, 7914, 5674, 12623, 12625, 12633, 12639, 12649, 12657, 2]
|
|
// Exports: default
|
|
|
|
// Module 12550 (GuildPowerupsModal)
|
|
import nativeDefault from "native" /* 576 */;
|
|
import openGuildPowerupsBottomSheetDefault from "openGuildPowerupsBottomSheet" /* 12587 */;
|
|
import openGuildPowerupsMultiPerkBottomSheetDefault from "openGuildPowerupsMultiPerkBottomSheet" /* 12616 */;
|
|
import GuildPowerupsLevelsSectionDefault from "GuildPowerupsLevelsSection" /* 12633 */;
|
|
import GuildPowerupsPerksSectionDefault from "GuildPowerupsPerksSection" /* 12639 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
const require = fn;
|
|
get_ActivityIndicator = fn(17);
|
|
({ ScrollView: closure_4, View: hasOwnProperty } = get_ActivityIndicator);
|
|
const GuildPowerupsConstants = fn(4495);
|
|
({ BoostInfoType: metroRequire, GuildPowerupType: closure_7 } = GuildPowerupsConstants);
|
|
const jsxProd = fn(21);
|
|
({ jsx: closure_8, jsxs: closure_9 } = jsxProd);
|
|
const createStyles = fn(4605);
|
|
let obj2 = { container: { flex: 1, backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW }, headerLeftContainer: null, headerRightContainer: null, boostInfoContainer: null, boostInfoSeparator: null, scrollView: null, boostButtonContainer: null };
|
|
let obj3 = { flex: 1, backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW };
|
|
obj2.headerLeftContainer = { paddingLeft: nativeDefault.space.PX_16 };
|
|
let obj4 = { paddingLeft: nativeDefault.space.PX_16 };
|
|
obj2.headerRightContainer = { paddingRight: nativeDefault.space.PX_16 };
|
|
let obj5 = { paddingRight: nativeDefault.space.PX_16 };
|
|
obj2.boostInfoContainer = { flexDirection: "row", justifyContent: "space-between", borderWidth: 1, borderStyle: "solid", borderColor: nativeDefault.colors.BORDER_SUBTLE, marginBottom: nativeDefault.space.PX_16 };
|
|
let size = { width: 1, height: "100%", backgroundColor: nativeDefault.colors.BORDER_SUBTLE };
|
|
obj2.boostInfoSeparator = size;
|
|
const obj6 = { flexDirection: "row", justifyContent: "space-between", borderWidth: 1, borderStyle: "solid", borderColor: nativeDefault.colors.BORDER_SUBTLE, marginBottom: nativeDefault.space.PX_16 };
|
|
obj2.scrollView = { paddingBottom: nativeDefault.space.PX_96 };
|
|
const rect = { paddingHorizontal: nativeDefault.space.PX_16, position: "absolute", bottom: 0, left: 0, right: 0 };
|
|
obj2.boostButtonContainer = rect;
|
|
let closure_10 = createStyles.createStyles(obj2);
|
|
size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/premium/powerups/native/GuildPowerupsModal.tsx");
|
|
|
|
export default function GuildPowerupsModal(guildId) {
|
|
guildId = guildId.guildId;
|
|
({ analyticsLocation, autoOpenPerkId } = guildId);
|
|
const autoOpenRequestId = guildId.autoOpenRequestId;
|
|
let buildGuildPowerupsSections;
|
|
let ref;
|
|
const gameServerEnabled = guildId(autoOpenRequestId[6]).useGameServerEnabled(guildId, "GuildPowerupsModal");
|
|
autoOpenPerkId(autoOpenRequestId[7])(guildId);
|
|
let obj = guildId(autoOpenRequestId[6]);
|
|
const autoDismissGuildPowerupsNotifications = guildId(autoOpenRequestId[8]).useAutoDismissGuildPowerupsNotifications(guildId);
|
|
autoOpenPerkId(autoOpenRequestId[9])(guildId, "GuildPowerupsModal", null != autoOpenPerkId);
|
|
let obj2 = guildId(autoOpenRequestId[8]);
|
|
({ bottom, top } = autoOpenPerkId(autoOpenRequestId[10])());
|
|
let tmp9 = closure_10();
|
|
let tmp8 = autoOpenPerkId(autoOpenRequestId[10])();
|
|
if (null != analyticsLocation) {
|
|
const items = [analyticsLocation];
|
|
let items1 = items;
|
|
} else {
|
|
items1 = [];
|
|
}
|
|
let tmp10 = autoOpenPerkId(autoOpenRequestId[11]);
|
|
buildGuildPowerupsSections = guildId(autoOpenRequestId[12]).useBuildGuildPowerupsSections(guildId, gameServerEnabled);
|
|
ref = buildGuildPowerupsSections.useRef(undefined);
|
|
const items2 = [autoOpenPerkId, autoOpenRequestId, guildId, buildGuildPowerupsSections];
|
|
const effect = buildGuildPowerupsSections.useEffect(() => {
|
|
if (null != autoOpenPerkId) {
|
|
if (null != autoOpenRequestId) {
|
|
if (ref.current !== tmp33) {
|
|
const iter = buildGuildPowerupsSections[Symbol.iterator]();
|
|
while (iter !== undefined) {
|
|
let listings = iter.next().listings;
|
|
for (const item10011 of listings) {
|
|
let tmp5 = item10011;
|
|
if ("singlePerk" === item10011.type) {
|
|
if (tmp5.powerup.skuId === autoOpenPerkId) {
|
|
ref.current = autoOpenRequestId;
|
|
let obj2 = { guildId: null, powerup: null };
|
|
obj2.guildId = guildId;
|
|
obj2.powerup = tmp5.powerup;
|
|
let tmp29 = openGuildPowerupsBottomSheetDefault(obj2);
|
|
obj.return();
|
|
iter.return();
|
|
}
|
|
}
|
|
if ("multiPerk" === tmp5.type) {
|
|
if (tmp5.group !== autoOpenPerkId) {
|
|
let powerups = tmp5.powerups;
|
|
}
|
|
ref.current = autoOpenRequestId;
|
|
let obj3 = { guildId: null, listing: null, onDismiss: null };
|
|
obj3.guildId = guildId;
|
|
obj3.listing = tmp5;
|
|
obj3.onDismiss = function onDismiss() {
|
|
return autoOpenPerkId(autoOpenRequestId[15]).pop();
|
|
};
|
|
let tmp19 = openGuildPowerupsMultiPerkBottomSheetDefault(obj3);
|
|
obj.return();
|
|
iter.return();
|
|
}
|
|
continue;
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}, items2);
|
|
const callback = buildGuildPowerupsSections.useCallback(() => {
|
|
autoOpenPerkId(autoOpenRequestId[15]).pop();
|
|
}, []);
|
|
const tmpResult = guildId(autoOpenRequestId[12]);
|
|
({ available, spent, total } = autoOpenPerkId(autoOpenRequestId[16])(guildId));
|
|
let obj3 = { value: tmp10(...items1).analyticsLocations, children: null };
|
|
const obj4 = { style: tmp9.container, children: null };
|
|
const obj5 = { title: null, headerTitle: null, headerTitleAlign: "center", headerStatusBarHeight: null, headerLeft: null, headerLeftContainerStyle: null, headerRightContainerStyle: null };
|
|
let intl = tmp(tmp2[18]).intl;
|
|
obj5.title = intl.string(autoOpenPerkId(autoOpenRequestId[19]).hjvcLO);
|
|
obj5.headerTitle = function headerTitle() {
|
|
const obj = { title: null };
|
|
const intl = guildId(autoOpenRequestId[18]).intl;
|
|
obj.title = intl.string(autoOpenPerkId(autoOpenRequestId[19]).hjvcLO);
|
|
return closure_1_8(guildId(autoOpenRequestId[20]).GenericHeaderTitle, obj);
|
|
};
|
|
obj5.headerStatusBarHeight = top + autoOpenPerkId(autoOpenRequestId[5]).space.PX_8;
|
|
let tmp13 = autoOpenPerkId(autoOpenRequestId[16])(guildId);
|
|
obj5.headerLeft = guildId(autoOpenRequestId[21]).getHeaderCloseButton(callback);
|
|
({ headerLeftContainer: obj6.headerLeftContainerStyle, headerRightContainer: obj6.headerRightContainerStyle } = tmp9);
|
|
const items3 = [closure_8(guildId(autoOpenRequestId[17]).Header, obj5), , ];
|
|
const obj7 = { contentContainerStyle: tmp9.scrollView, children: null };
|
|
const obj8 = { style: tmp9.boostInfoContainer, children: null };
|
|
const items4 = [closure_8(autoOpenPerkId(autoOpenRequestId[22]), { count: available, type: constants.AVAILABLE }), closure_8(closure_5, { style: tmp9.boostInfoSeparator }), closure_8(autoOpenPerkId(autoOpenRequestId[22]), { count: spent, type: constants.SPENT }), closure_8(closure_5, { style: tmp9.boostInfoSeparator }), closure_8(autoOpenPerkId(autoOpenRequestId[22]), { count: total, type: constants.TOTAL })];
|
|
obj8.children = items4;
|
|
const items5 = [
|
|
closure_9(closure_5, obj8),
|
|
closure_8(autoOpenPerkId(autoOpenRequestId[23]), { guildId }),
|
|
buildGuildPowerupsSections.map((type) => {
|
|
type = type.type;
|
|
if (constants2.LEVEL === type) {
|
|
const obj2 = { guildId, listings: type.listings };
|
|
return React6(GuildPowerupsLevelsSectionDefault, obj2, type.type);
|
|
} else if (tmp.PERK === type) {
|
|
const obj = { guildId, listings: type.listings };
|
|
return React6(GuildPowerupsPerksSectionDefault, obj, type.type);
|
|
} else {
|
|
return null;
|
|
}
|
|
}),
|
|
closure_8(autoOpenPerkId(autoOpenRequestId[26]), { guildId })
|
|
];
|
|
obj7.children = items5;
|
|
items3[1] = closure_9(ref, obj7);
|
|
const obj14 = { style: null, children: closure_8(guildId(autoOpenRequestId[27]).GuildPowerupsBoostButton, { guildId }) };
|
|
const items6 = [tmp9.boostButtonContainer, { paddingBottom: bottom }];
|
|
obj14.style = items6;
|
|
items3[2] = closure_8(closure_5, obj14);
|
|
obj4.children = items3;
|
|
obj3.children = closure_9(closure_5, obj4);
|
|
return closure_8(guildId(autoOpenRequestId[11]).AnalyticsLocationProvider, obj3);
|
|
};
|