110 lines
7.3 KiB
TypeScript
110 lines
7.3 KiB
TypeScript
/* Metro module 15282; source: modules/premium/promotions/native/BogoPromotionActionSheet.tsx; dependencies: [31, 27, 4502, 1880, 661, 1376, 33, 4501, 697, 6771, 566, 7040, 6275, 5475, 4573, 1244, 6766, 1948, 4578, 7954, 2] */
|
|
function _fun116900(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15479:6, offset: 0x0249a932, size: 581 bytes, params: 8, frame: 23
|
|
var object3;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
|
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
|
const env0_6 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
|
|
let value = require(661) /* metro dependency 661: Constants */;
|
|
const env0_7 = value.AnalyticsSections;
|
|
const env0_8 = value.AnalyticsObjects;
|
|
const env0_9 = value.AnalyticsPages;
|
|
const env0_10 = value.AnalyticsObjectTypes;
|
|
const env0_11 = value.HelpdeskArticles;
|
|
const env0_12 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_13 = value.jsx;
|
|
const env0_14 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object3 = {};
|
|
const object4 = {'dipslay': 'flex', 'flexDirection': 'column', 'justifyContent': 'center', 'alignItems': 'center'};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object4.padding = PX_16;
|
|
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object4.marginBottom = PX_24;
|
|
object3.container = object4;
|
|
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object3.buttonContainer = {'marginTop': null, 'width': 335, 'height': 48, marginTop: PX_24};
|
|
object3.header = {'marginBottom': 12, 'textAlign': 'center'};
|
|
object3.subheader = {textAlign: 'center'};
|
|
const object6 = {'alignSelf': 'center', 'paddingBottom': null, 'height': 213, 'width': 335, 'borderRadius': null,
|
|
'marginBottom': 12};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object6.paddingBottom = PX_16;
|
|
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
object3.image = object6;
|
|
object3.nitroWheelIcon = {'bottom': -1, 'width': 22, 'height': 16};
|
|
const env0_15 = Reflect.apply(createStyles, value, [object3]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/promotions/native/BogoPromotionActionSheet.tsx');
|
|
exports.default = BogoPromotionActionSheet;
|
|
}
|
|
|
|
function BogoPromotionActionSheet({markAsDismissed}) { // fn#116901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15479:969, offset: 0x0249ab77, size: 784 bytes, params: 2, frame: 33
|
|
const styles = useStyles();
|
|
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
|
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
|
function() {
|
|
return AccessibilityStore.useReducedMotion;
|
|
});
|
|
const binding = env0_3;
|
|
const value2 = binding.useCallback(_fun116903, [analyticsLocations, markAsDismissed]);
|
|
const value3 = binding.useCallback(function() {
|
|
markAsDismissed(ContentDismissActionType.USER_DISMISS);
|
|
}, [markAsDismissed]);
|
|
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
|
const items7 = [styles.container];
|
|
const items2 = [((Component) => <Component source={{uri: 'https://cdn.discordapp.com/assets/content/a59aed2e0e61a955dc3e0f4f6f7ab295e39f89a93c4f01e4bd84ed7fb418ec63.png'}} style={styles.image} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
const items3 = [styles.header];
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
items2[1] = <Text style={items3} color="mobile-text-heading-primary" variant="heading-xl/bold">{Reflect.apply(string,
|
|
intl, [(require(1244) /* metro dependency 1244: indexNative */).t['6Jjfk8']])}</Text>;
|
|
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
|
const items4 = [styles.subheader];
|
|
const format = intl.format;
|
|
const y7lJK6 = (require(1244) /* metro dependency 1244: indexNative */).t.y7lJK6;
|
|
const defaultImport2 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
|
const getArticleURL = defaultImport2.getArticleURL;
|
|
const SUMMER_BOGO_2025 = HelpdeskArticles.SUMMER_BOGO_2025;
|
|
items2[2] = <TextWithIOSLinkWorkaround style={items4} color="text-subtle" variant="text-md/medium">{Reflect.apply(format,
|
|
intl, [y7lJK6, {helpCenterLink: Reflect.apply(getArticleURL, defaultImport2,
|
|
[SUMMER_BOGO_2025])}])}</TextWithIOSLinkWorkaround>;
|
|
const items5 = [styles.buttonContainer];
|
|
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
|
string = intl.string;
|
|
const J61px0 = (require(1244) /* metro dependency 1244: indexNative */).t.J61px0;
|
|
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
|
|
const items6 = [styles.nitroWheelIcon];
|
|
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
|
items2[3] = <View style={items5}><Button text={Reflect.apply(string, intl,
|
|
[J61px0])} size="lg" onPress={value2} icon={<NitroWheelIcon style={items6} color={WHITE} size="custom" />} iconPosition="start" variant="experimental_premium-primary" shiny={!useReducedMotion} /></View>;
|
|
return (
|
|
<BottomSheet onDismiss={value3}>
|
|
<View style={items7}>
|
|
{items2}
|
|
</View>
|
|
</BottomSheet>
|
|
);
|
|
}
|
|
|
|
function _fun116903() { // fn#116903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15479:1142, offset: 0x0249ae87, size: 147 bytes, params: 1, frame: 15
|
|
const markAsDismissedBinding = markAsDismissed;
|
|
const PRIMARY = ContentDismissActionType.PRIMARY;
|
|
markAsDismissedBinding(PRIMARY);
|
|
const defaultImport = importDefault(7040) /* metro dependency 7040: openPremiumPlanSelectionActionSheet */;
|
|
const BOGO_PROMOTION_ACTION_SHEET = AnalyticsPages.BOGO_PROMOTION_ACTION_SHEET;
|
|
const FOOTER = AnalyticsSections.FOOTER;
|
|
const BUTTON_CTA = AnalyticsObjects.BUTTON_CTA;
|
|
const BUY = AnalyticsObjectTypes.BUY;
|
|
const TIER_2 = PremiumTypes.TIER_2;
|
|
defaultImport({analyticsLocation: {page: BOGO_PROMOTION_ACTION_SHEET, section: FOOTER, object: BUTTON_CTA,
|
|
objectType: BUY}, analyticsLocations: analyticsLocations, premiumType: TIER_2});
|
|
}
|
|
|