169 lines
11 KiB
TypeScript
169 lines
11 KiB
TypeScript
/* Metro module 14600; source: modules/premium/powerups/native/GuildPowerupsModal.tsx; dependencies: [31, 27, 8259, 33, 4501, 697, 6857, 14601, 14607, 1585, 6771, 14619, 5080, 8254, 5287, 1244, 2256, 9603, 5282, 14620, 14622, 14629, 14661, 14673, 14680, 2] */
|
|
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
|
|
import GuildPowerupsMessages from '../GuildPowerups.messages.js'; /* Metro dependency 2256 */
|
|
import ModalActionCreators from '../../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
|
|
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
|
|
import UseGuildPowerupsBoostCount from '../hooks/useGuildPowerupsBoostCount.tsx'; /* Metro dependency 8254 */
|
|
import UseLoadGuildPowerups from '../hooks/useLoadGuildPowerups.tsx'; /* Metro dependency 14601 */
|
|
import GuildPowerupsBoostInfo from './GuildPowerupsBoostInfo.tsx'; /* Metro dependency 14620 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as NavigatorHeaderNativeModule from '../../../../design/components/Navigator/native/NavigatorHeader.native.tsx'; /* Metro dependency 5282 */
|
|
import * as Module05287Module from '../../../../by-id/module-05287.js'; /* Metro dependency 5287 */
|
|
import * as UseAnalyticsLocationsModule from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
|
|
import * as GameServerExperimentModule from '../../game_server/GameServerExperiment.tsx'; /* Metro dependency 6857 */
|
|
import * as HeaderSharedModule from '../../../main_tabs_v2/native/shared_components/HeaderShared.tsx'; /* Metro dependency 9603 */
|
|
import * as UseGuildPowerupsNotificationsModule from '../hooks/useGuildPowerupsNotifications.tsx'; /* Metro dependency 14607 */
|
|
import * as PowerupListingModule from '../utils/powerupListing.tsx'; /* Metro dependency 14619 */
|
|
import * as GuildPowerupsBoostButtonModule from './GuildPowerupsBoostButton.tsx'; /* Metro dependency 14680 */
|
|
|
|
function _fun110380(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14797:6, offset: 0x023775a5, size: 519 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactNativeModule;
|
|
const env0_4 = value.ScrollView;
|
|
const env0_5 = value.View;
|
|
value = require(8259) /* metro dependency 8259: GuildPowerupsConstants */;
|
|
const env0_6 = value.BoostInfoType;
|
|
const env0_7 = value.GuildPowerupType;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_8 = value.jsx;
|
|
const env0_9 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
|
|
const object3 = {};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object3.paddingHorizontal = PX_16;
|
|
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object3.paddingTop = PX_8;
|
|
object.headerContainer = object3;
|
|
const object4 = {'flexDirection': 'row', 'justifyContent': 'space-between', 'borderWidth': 1,
|
|
'borderStyle': 'solid'};
|
|
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object4.borderColor = BORDER_SUBTLE;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object4.marginBottom = PX_16;
|
|
object.boostInfoContainer = object4;
|
|
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object.boostInfoSeparator = {'width': 1, 'height': '100%', backgroundColor: BORDER_SUBTLE};
|
|
const PX_96 = (importDefault(697) /* metro dependency 697: native */).space.PX_96;
|
|
object.scrollView = {paddingBottom: PX_96};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object.boostButtonContainer = {'paddingHorizontal': null, 'position': 'absolute', 'bottom': 0, 'left': 0,
|
|
'right': 0, paddingHorizontal: PX_16};
|
|
const env0_10 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/premium/powerups/native/GuildPowerupsModal.tsx');
|
|
exports.default = GuildPowerupsModal;
|
|
function GuildPowerupsModal({guildId, analyticsLocation}) { // fn#110381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14797:917, offset: 0x023777ac, size: 895 bytes, params: 2, frame: 36
|
|
const value2 = (GameServerExperimentModule).useGameServerEnabled(guildId,
|
|
'GuildPowerupsModal');
|
|
(UseLoadGuildPowerups)(guildId);
|
|
(UseGuildPowerupsNotificationsModule).useAutoDismissGuildPowerupsNotifications(guildId);
|
|
const bottom = (UseSafeAreaInsetsNative)().bottom;
|
|
const styles = useStyles();
|
|
const defaultImport = UseAnalyticsLocations;
|
|
const r6 = analyticsLocation != null ? [analyticsLocation] : [];
|
|
const items5 = [];
|
|
arraySpread(items5, r6, 0, undefined);
|
|
const analyticsLocations = apply(defaultImport, items5, undefined, undefined).analyticsLocations;
|
|
const value3 = (PowerupListingModule).useBuildGuildPowerupsSections(guildId,
|
|
value2);
|
|
const value4 = ReactModule.useCallback(_fun110382, []);
|
|
const {available, spent,
|
|
total} = (UseGuildPowerupsBoostCount)(guildId);
|
|
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
|
|
const Header = (Module05287Module).Header;
|
|
const intl = (IndexNativeModule).intl;
|
|
const items6 = [
|
|
<View style={styles.headerContainer}>
|
|
<Header
|
|
title={intl.string((GuildPowerupsMessages).hjvcLO)}
|
|
headerTitle={headerTitle_110383}
|
|
headerTitleAlign="center"
|
|
headerLeft={(NavigatorHeaderNativeModule).getHeaderCloseButton(value4)}
|
|
/>
|
|
</View>,
|
|
];
|
|
const AVAILABLE = BoostInfoType.AVAILABLE;
|
|
const items2 = [
|
|
<GuildPowerupsBoostInfo count={available} type={AVAILABLE} />,
|
|
];
|
|
items2[1] = <View style={styles.boostInfoSeparator} />;
|
|
let value = GuildPowerupsBoostInfo;
|
|
const SPENT = BoostInfoType.SPENT;
|
|
items2[2] = ((Component) => <Component count={spent} type={SPENT} />)(value);
|
|
items2[3] = <View style={styles.boostInfoSeparator} />;
|
|
value = GuildPowerupsBoostInfo;
|
|
const TOTAL = BoostInfoType.TOTAL;
|
|
items2[4] = ((Component) => <Component count={total} type={TOTAL} />)(value);
|
|
const items3 = [
|
|
<View style={styles.boostInfoContainer}>
|
|
{items2}
|
|
</View>,
|
|
];
|
|
items3[1] = ((Component) => <Component guildId={guildId} />)(importDefault(14622) /* metro dependency 14622: GuildPowerupsNotificationContainer */);
|
|
items3[2] = value3.map(_fun110384);
|
|
items3[3] = ((Component) => <Component guildId={guildId} />)(importDefault(14673) /* metro dependency 14673: GuildPowerupsRecentActivitySection */);
|
|
items6[1] = (
|
|
<ScrollView contentContainerStyle={styles.scrollView}>
|
|
{items3}
|
|
</ScrollView>
|
|
);
|
|
const items4 = [styles.boostButtonContainer];
|
|
items4[1] = {paddingBottom: bottom};
|
|
const GuildPowerupsBoostButton = (GuildPowerupsBoostButtonModule).GuildPowerupsBoostButton;
|
|
items6[2] = (
|
|
<View style={items4}>
|
|
<GuildPowerupsBoostButton guildId={guildId} />
|
|
</View>
|
|
);
|
|
return (
|
|
<AnalyticsLocationProvider value={analyticsLocations}>
|
|
<View style={styles.container}>
|
|
{items6}
|
|
</View>
|
|
</AnalyticsLocationProvider>
|
|
);
|
|
function _fun110382() { // fn#110382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14797:1241, offset: 0x02377b2b, size: 37 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
(ModalActionCreators).pop();
|
|
}
|
|
|
|
function GuildPowerupsModalHeaderTitle() { // fn#110383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14797:1523, owner: GuildPowerupsModal.headerTitle, offset: 0x02377b50, size: 98 bytes, params: 1, frame: 18
|
|
const GenericHeaderTitle = (HeaderSharedModule).GenericHeaderTitle;
|
|
const intl = (IndexNativeModule).intl;
|
|
return (
|
|
<GenericHeaderTitle
|
|
title={intl.string((GuildPowerupsMessages).hjvcLO)}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function _fun110384(a0) { // fn#110384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14797:1981, offset: 0x02377bb2, size: 171 bytes, params: 2, frame: 17
|
|
const type = a0.type;
|
|
const value = environment.__proto__;
|
|
const LEVEL = GuildPowerupType.LEVEL;
|
|
if (LEVEL === type) {
|
|
return ((Component) => <Component guildId={guildId} listings={a0.listings} key={a0.type} />)(importDefault(14629) /* metro dependency 14629: GuildPowerupsLevelsSection */);
|
|
}
|
|
const PERK = GuildPowerupType.PERK;
|
|
if (PERK === type) {
|
|
return ((Component) => <Component guildId={guildId} listings={a0.listings} key={a0.type} />)(importDefault(14661) /* metro dependency 14661: GuildPowerupsPerksSection */);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun110380, 14600, [31, 27, 8259, 33, 4501, 697, 6857, 14601, 14607, 1585, 6771, 14619, 5080, 8254, 5287,
|
|
1244, 2256, 9603, 5282, 14620, 14622, 14629, 14661, 14673, 14680,
|
|
2]) /* metro module 14600, dependencies: [31, 27, 8259, 33, 4501, 697, 6857, 14601, 14607, 1585, 6771, 14619, 5080, 8254, 5287, 1244, 2256, 9603, 5282, 14620, 14622, 14629, 14661, 14673, 14680, 2] */;
|