159 lines
9.0 KiB
TypeScript
159 lines
9.0 KiB
TypeScript
/* Metro module 13553; source: modules/quests/native/BountiesModal/BountiesModalEndCard.tsx; dependencies: [27, 33, 4501, 697, 13542, 9495, 4017, 4504, 4507, 4589, 9520, 7121, 6533, 7120, 5475, 4573, 2] */
|
|
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 ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
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 QuestContentModule from '../../../../external/discord_common/js/shared/shared-constants/QuestContent.tsx'; /* Metro dependency 6533 */
|
|
import * as AnalyticsTypesModule from '../../lib/analytics/AnalyticsTypes.tsx'; /* Metro dependency 7120 */
|
|
import * as AdCreativeTypeModule from '../../../../external/discord_common/js/shared/shared-constants/AdCreativeType.tsx'; /* Metro dependency 7121 */
|
|
import * as BountyCtaHelpersModule from './BountyCtaHelpers.tsx'; /* Metro dependency 13542 */
|
|
|
|
function _fun102956(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:6, offset: 0x02251346, size: 222 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactNativeModule;
|
|
const env0_3 = value.Pressable;
|
|
const env0_4 = value.StyleSheet;
|
|
const env0_5 = value.View;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_6 = value.jsx;
|
|
const env0_7 = value.jsxs;
|
|
const env0_8 = (CreateStylesModule).createStyles(_fun102957);
|
|
object = {code: 'function BountiesModalEndCardTsx1(){const{withTiming,visible,timingStandard}=this.__closure;return{opacity:withTiming(visible?1:0,timingStandard)};}'};
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalEndCard.tsx');
|
|
exports.default = BountiesModalEndCard;
|
|
function _fun102957() { // fn#102957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:195, offset: 0x02251424, size: 249 bytes, params: 1, frame: 17
|
|
const object = {container: {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0,
|
|
'justifyContent': 'center', 'alignItems': 'center'}};
|
|
const object2 = {};
|
|
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
|
|
object2['backgroundColor'] = 'rgba(241, 251, 169, 0.15)';
|
|
object.backdropTint = object2;
|
|
const object3 = {};
|
|
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
|
|
object.backdropGradient = object3;
|
|
const object4 = {'width': 92, 'height': 92, 'borderRadius': null, 'borderWidth': 1};
|
|
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
|
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
|
object4.borderColor = BORDER_MUTED;
|
|
object.image = object4;
|
|
const object5 = {};
|
|
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
|
object5.gap = PX_4;
|
|
object5.alignItems = 'center';
|
|
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object5.marginTop = PX_12;
|
|
object.info = object5;
|
|
object.ctaContainer = {'position': 'relative', 'alignItems': 'center'};
|
|
return object;
|
|
}
|
|
|
|
function BountiesModalEndCard({bounty, visible, sourceQuestContent}) { // fn#102958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:849, offset: 0x0225151d, size: 693 bytes, params: 2, frame: 28
|
|
var r0;
|
|
var View2;
|
|
var items2;
|
|
var label;
|
|
var items3;
|
|
const Text = (TextModule).Text;
|
|
var items4;
|
|
var value;
|
|
const styles = useStyles();
|
|
const bountyCtaInfo = (BountyCtaHelpersModule).getBountyCtaInfo(bounty);
|
|
const r17 = bountyCtaInfo.iconImageUri != null ? (require(9495) /* metro dependency 9495: AssetUtils */).getScaledImageUrl({'assetUrl': null,
|
|
'width': 92, 'height': 92, assetUrl: bountyCtaInfo.iconImageUri}) : undefined;
|
|
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
|
|
const closure = function() {
|
|
var object = {};
|
|
var moduleValue = require(dependencyMap[7]);
|
|
object.opacity = moduleValue.withTiming(visible ? 1 : 0, require(dependencyMap[8]).timingStandard);
|
|
return object;
|
|
};
|
|
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, visible: visible,
|
|
timingStandard: (require(4507) /* metro dependency 4507: timingPresets */).timingStandard};
|
|
closure.__workletHash = 15062259404736;
|
|
closure.__initData = env0_9;
|
|
if (visible) {
|
|
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
|
var view2Props = {style: [styles.container, Reflect.apply(useAnimatedStyle, ReanimatedRexportModule,
|
|
[closure])],
|
|
pointerEvents: 'box-none'};
|
|
items2 = [
|
|
<View style={styles.backdropTint} />,
|
|
];
|
|
items2[1] = ((Component) => <Component colors={['rgba(0, 0, 0, 0.60)', 'rgba(0, 0, 0, 1)']} locations={[0,
|
|
0.841]} style={styles.backdropGradient} />)(importDefault(4589) /* metro dependency 4589 */);
|
|
var pressableBindingProps = {'onPress': null, 'hitSlop': 16, 'accessibilityRole': 'button',
|
|
onPress: onPress_102960};
|
|
label = bountyCtaInfo.label;
|
|
pressableBindingProps.accessibilityLabel = label;
|
|
pressableBindingProps.style = styles.ctaContainer;
|
|
items3 = [
|
|
((Component) => <Component source={{uri: r17}} style={styles.image} />)(importDefault(5475) /* metro dependency 5475: FastImage */),
|
|
|
|
|
|
];
|
|
var viewBindingProps = {style: styles.info};
|
|
label = bountyCtaInfo.label;
|
|
value = (
|
|
<Text variant="text-md/semibold" color="text-strong">
|
|
{label}
|
|
</Text>
|
|
);
|
|
items4 = [value];
|
|
items4[1] = (
|
|
<Text variant="text-sm/medium" color="text-default">
|
|
{bountyCtaInfo.subtext}
|
|
</Text>
|
|
);
|
|
items3[1] = (
|
|
<View {...viewBindingProps}>
|
|
{items4}
|
|
</View>
|
|
);
|
|
items2[2] = (
|
|
<Pressable {...pressableBindingProps}>
|
|
{items3}
|
|
</Pressable>
|
|
);
|
|
value = (
|
|
<View2 {...view2Props}>
|
|
{items2}
|
|
</View2>
|
|
);
|
|
r0 = value;
|
|
} else {
|
|
r0 = visible;
|
|
}
|
|
return r0;
|
|
function BountiesModalEndCardOnPress() { // fn#102960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:1533, owner: BountiesModalEndCard.onPress, offset: 0x02251827, size: 166 bytes, params: 1, frame: 18
|
|
let value = environment.__proto__;
|
|
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
|
|
const openAdGameLinkDirectly = value.openAdGameLinkDirectly;
|
|
const object = {};
|
|
const bountyBinding = bounty;
|
|
object.adContentId = bountyBinding.id;
|
|
const AdCreativeType = (AdCreativeTypeModule).AdCreativeType;
|
|
const BOUNTY = AdCreativeType.BOUNTY;
|
|
object.adCreativeType = BOUNTY;
|
|
object.cta = bountyBinding.cta;
|
|
const object2 = {};
|
|
const QuestContent = (QuestContentModule).QuestContent;
|
|
const VIDEO_MODAL_ICON_END_CARD = QuestContent.VIDEO_MODAL_ICON_END_CARD;
|
|
object2.content = VIDEO_MODAL_ICON_END_CARD;
|
|
const QuestContentCTA = (AnalyticsTypesModule).QuestContentCTA;
|
|
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
|
|
object2.ctaContent = OPEN_GAME_LINK;
|
|
object2.sourceQuestContent = sourceQuestContent;
|
|
Reflect.apply(openAdGameLinkDirectly, value, [object, object2]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun102956, 13553, [27, 33, 4501, 697, 13542, 9495, 4017, 4504, 4507, 4589, 9520, 7121, 6533, 7120, 5475,
|
|
4573,
|
|
2]) /* metro module 13553, dependencies: [27, 33, 4501, 697, 13542, 9495, 4017, 4504, 4507, 4589, 9520, 7121, 6533, 7120, 5475, 4573, 2] */;
|