162 lines
10 KiB
TypeScript
162 lines
10 KiB
TypeScript
/* Metro module 14573; source: modules/game_claim/native/GameClaimCoachmark.tsx; dependencies: [5, 31, 27, 661, 1376, 33, 697, 14574, 8518, 4582, 4501, 14575, 14577, 1244, 6239, 5278, 5312, 4573, 4578, 6249, 6906, 2] */
|
|
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import UseGameNameAndCoverImage from '../../games/hooks/useGameNameAndCoverImage.tsx'; /* Metro dependency 14577 */
|
|
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
|
|
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
import * as ButtonConstantsNativeModule from '../../../design/components/Button/native/ButtonConstants.native.tsx'; /* Metro dependency 4582 */
|
|
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
|
|
import * as XSmallIconModule from '../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */
|
|
import * as CardNativeModule from '../../../design/components/Card/native/Card.native.tsx'; /* Metro dependency 6239 */
|
|
import * as LinkExternalSmallIconModule from '../../../design/components/Icon/native/redesign/generated/LinkExternalSmallIcon.tsx'; /* Metro dependency 6249 */
|
|
import * as UseScaledTextLineHeightAndroidModule from '../../screen/native/useScaledTextLineHeight.android.tsx'; /* Metro dependency 8518 */
|
|
import * as GameClaimCardStackModule from './GameClaimCardStack.tsx'; /* Metro dependency 14574 */
|
|
import * as UnclaimedGamesActionCreatorsModule from '../UnclaimedGamesActionCreators.tsx'; /* Metro dependency 14575 */
|
|
|
|
function _fun110253(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14770:6, offset: 0x02371bca, size: 555 bytes, params: 8, frame: 25
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
const PX_82 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
const env0_12 = 2 * PX_12;
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
object = {};
|
|
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object.card = {padding: PX_12};
|
|
const object3 = {'position': 'absolute', 'top': null, 'right': null, 'width': 24, 'height': 24,
|
|
'alignItems': 'center', 'justifyContent': 'center', 'zIndex': 1};
|
|
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object3.top = PX_12;
|
|
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object3.right = PX_12;
|
|
object.closeButton = object3;
|
|
object.centeredText = {textAlign: 'center'};
|
|
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
|
object.body = {marginTop: PX_4};
|
|
const PX_83 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object.cta = {marginTop: PX_83};
|
|
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [object]);
|
|
value = value.memo(_fun110254);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/game_claim/native/GameClaimCoachmark.tsx');
|
|
exports.default = value;
|
|
exports.GAME_CLAIM_NOTICE_MARGIN_TOP = PX_8;
|
|
exports.GAME_CLAIM_NOTICE_MARGIN_BOTTOM = PX_82;
|
|
exports.getScaledGameClaimNoticeHeight = getScaledGameClaimNoticeHeight;
|
|
function _fun110254({guild, markAsDismissed}) { // fn#110254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14770:650, offset: 0x02371df5, size: 852 bytes, params: 2, frame: 31
|
|
const styles = useStyles();
|
|
const useUnclaimedGameIdsForGuild = UnclaimedGamesActionCreatorsModule.useUnclaimedGameIdsForGuild;
|
|
const r5 = Reflect.apply(useUnclaimedGameIdsForGuild, UnclaimedGamesActionCreatorsModule, [guild.id])[0] ?? null;
|
|
const defaultImport = UseGameNameAndCoverImage;
|
|
const intl = (IndexNativeModule).intl;
|
|
let string = intl.string;
|
|
const t = (IndexNativeModule).t;
|
|
const VQq92a = t.VQq92a;
|
|
const {coverImageUrl, gameName} = defaultImport(r5, Reflect.apply(string, intl, [VQq92a]));
|
|
if (coverImageUrl == null) {
|
|
return null;
|
|
}
|
|
const features = guild.features;
|
|
const has = features.has;
|
|
const VERIFIED = GuildFeatures.VERIFIED;
|
|
const value5 = Reflect.apply(has, features, [VERIFIED]);
|
|
string = intl.string;
|
|
const r10 = value5 ? Reflect.apply(string, intl, [t.uUARXe]) : Reflect.apply(string, intl, [t['0Dx29f']]);
|
|
const Card = (CardNativeModule).Card;
|
|
const PressableOpacity = (PressablesModule).PressableOpacity;
|
|
const XSmallIcon = (XSmallIconModule).XSmallIcon;
|
|
const items2 = [
|
|
<PressableOpacity
|
|
accessibilityRole="button"
|
|
onPress={function() {
|
|
return markAsDismissed(ContentDismissActionType.USER_DISMISS);
|
|
}}
|
|
style={styles.closeButton}
|
|
>
|
|
<XSmallIcon size="sm" color="text-default" />
|
|
</PressableOpacity>,
|
|
];
|
|
items2[1] = ((Component) => <Component imageSrc={coverImageUrl} />)(importDefault(14574) /* metro dependency 14574: GameClaimCardStack */);
|
|
const Text = (TextModule).Text;
|
|
const format = intl.format;
|
|
const Q11WTQ = (IndexNativeModule).t.Q11WTQ;
|
|
items2[2] = (
|
|
<Text
|
|
variant="text-md/medium"
|
|
color="always-white"
|
|
style={styles.centeredText}
|
|
>
|
|
{Reflect.apply(format, intl, [Q11WTQ, {gameName: gameName}])}
|
|
</Text>
|
|
);
|
|
items2[3] = (
|
|
<Text
|
|
variant="text-sm/normal"
|
|
color="always-white"
|
|
style={[styles.body, styles.centeredText]}
|
|
>
|
|
{r10}
|
|
</Text>
|
|
);
|
|
const Button = (ButtonNativeModule).Button;
|
|
const buttonProps = {'variant': 'primary', 'size': 'sm', 'text': null, 'icon': null, 'iconPosition': 'end',
|
|
text: intl.string((IndexNativeModule).t['2u6ZlY'])};
|
|
const LinkExternalSmallIcon = (LinkExternalSmallIconModule).LinkExternalSmallIcon;
|
|
buttonProps.icon = <LinkExternalSmallIcon size="xs" color="white" />;
|
|
buttonProps.onPress = Module00005(_fun110257);
|
|
items2[4] = (
|
|
<View style={styles.cta}>
|
|
<Button {...buttonProps} />
|
|
</View>
|
|
);
|
|
return (
|
|
<Card variant="secondary" style={styles.card}>
|
|
{items2}
|
|
</Card>
|
|
);
|
|
function* _fun110257() { // fn#110257, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14770:1723, offset: 0x02372171, size: 94 bytes, params: 1, frame: 14
|
|
if (true) {
|
|
value = environment.__proto__;
|
|
value = environment.__proto__.__proto__;
|
|
var TAKE_ACTION = env2_7.TAKE_ACTION;
|
|
require(TAKE_ACTION);
|
|
var value3 = env2_1(env2_2[20]);
|
|
var redirectDeveloperPortalWithHandoffToken = value3.redirectDeveloperPortalWithHandoffToken;
|
|
var DEVELOPER_PORTAL_APPLICATIONS_GAME_IDENTITY = env2_6.DEVELOPER_PORTAL_APPLICATIONS_GAME_IDENTITY;
|
|
yield Reflect.apply(redirectDeveloperPortalWithHandoffToken, value3,
|
|
[DEVELOPER_PORTAL_APPLICATIONS_GAME_IDENTITY]);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function getScaledGameClaimNoticeHeight(a0) { // fn#110258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14770:2064, offset: 0x023721cf, size: 206 bytes, params: 2, frame: 20
|
|
const value2 = PX_8 + env0_12;
|
|
const CARD_STACK_HEIGHT = (GameClaimCardStackModule).CARD_STACK_HEIGHT;
|
|
const value3 = value2 + CARD_STACK_HEIGHT;
|
|
const value4 = value3 + UseScaledTextLineHeightAndroidModule.scaleTextLineHeight('text-md/medium', a0);
|
|
const PX_4 = (Native).space.PX_4;
|
|
const value5 = value4 + PX_4;
|
|
const value7 = 2 * UseScaledTextLineHeightAndroidModule.scaleTextLineHeight('text-sm/normal', a0);
|
|
const PX_82 = (Native).space.PX_8;
|
|
const value8 = value5 + value7 + PX_82;
|
|
const SMALL_BUTTON_HEIGHT = (ButtonConstantsNativeModule).SMALL_BUTTON_HEIGHT;
|
|
return value8 + SMALL_BUTTON_HEIGHT + PX_8;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun110253, 14573, [5, 31, 27, 661, 1376, 33, 697, 14574, 8518, 4582, 4501, 14575, 14577, 1244, 6239,
|
|
5278, 5312, 4573, 4578, 6249, 6906,
|
|
2]) /* metro module 14573, dependencies: [5, 31, 27, 661, 1376, 33, 697, 14574, 8518, 4582, 4501, 14575, 14577, 1244, 6239, 5278, 5312, 4573, 4578, 6249, 6906, 2] */;
|