156 lines
9.4 KiB
TypeScript
156 lines
9.4 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] */
|
|
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import HelpdeskUtils from '../../../../utils/HelpdeskUtils.tsx'; /* Metro dependency 1948 */
|
|
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
|
|
import FastImage from '../../../../components_native/common/FastImage.tsx'; /* Metro dependency 5475 */
|
|
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
|
|
import OpenPremiumPlanSelectionActionSheet from '../../native/openPremiumPlanSelectionActionSheet.tsx'; /* Metro dependency 7040 */
|
|
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 ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as DismissibleContentConstantsModule from '../../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
|
|
import * as PremiumConstantsModule from '../../PremiumConstants.tsx'; /* Metro dependency 1880 */
|
|
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 BottomSheetNativeModule from '../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
|
|
import * as TextWithIOSLinkWorkaroundModule from '../../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
|
|
import * as NitroWheelIconModule from '../../../../design/components/Icon/native/redesign/generated/NitroWheelIcon.tsx'; /* Metro dependency 7954 */
|
|
|
|
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
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ConstantsModule;
|
|
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;
|
|
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;
|
|
object = {};
|
|
const object2 = {'dipslay': 'flex', 'flexDirection': 'column', 'justifyContent': 'center', 'alignItems': 'center'};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object2.padding = PX_16;
|
|
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object2.marginBottom = PX_24;
|
|
object.container = object2;
|
|
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object.buttonContainer = {'marginTop': null, 'width': 335, 'height': 48, marginTop: PX_24};
|
|
object.header = {'marginBottom': 12, 'textAlign': 'center'};
|
|
object.subheader = {textAlign: 'center'};
|
|
const object5 = {'alignSelf': 'center', 'paddingBottom': null, 'height': 213, 'width': 335, 'borderRadius': null,
|
|
'marginBottom': 12};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object5.paddingBottom = PX_16;
|
|
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
object.image = object5;
|
|
object.nitroWheelIcon = {'bottom': -1, 'width': 22, 'height': 16};
|
|
const env0_15 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).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 = (UseAnalyticsLocations)().analyticsLocations;
|
|
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
|
function() {
|
|
return AccessibilityStore.useReducedMotion;
|
|
});
|
|
const value2 = ReactModule.useCallback(_fun116903, [analyticsLocations, markAsDismissed]);
|
|
const value3 = ReactModule.useCallback(function() {
|
|
markAsDismissed(ContentDismissActionType.USER_DISMISS);
|
|
}, [markAsDismissed]);
|
|
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
|
|
const items7 = [styles.container];
|
|
const items2 = [
|
|
((Component) => <Component source={{uri: 'https://cdn.discordapp.com/assets/content/a59aed2e0e61a955dc3e0f4f6f7ab295e39f89a93c4f01e4bd84ed7fb418ec63.png'}} style={styles.image} />)(FastImage),
|
|
|
|
];
|
|
const Text = (TextModule).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 = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
|
|
const items4 = [styles.subheader];
|
|
const format = intl.format;
|
|
const y7lJK6 = (require(1244) /* metro dependency 1244: indexNative */).t.y7lJK6;
|
|
const defaultImport2 = 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 = (ButtonNativeModule).Button;
|
|
string = intl.string;
|
|
const J61px0 = (require(1244) /* metro dependency 1244: indexNative */).t.J61px0;
|
|
const NitroWheelIcon = (NitroWheelIconModule).NitroWheelIcon;
|
|
const items6 = [styles.nitroWheelIcon];
|
|
const WHITE = (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 = 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});
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun116900, 15282, [31, 27, 4502, 1880, 661, 1376, 33, 4501, 697, 6771, 566, 7040, 6275, 5475, 4573,
|
|
1244, 6766, 1948, 4578, 7954,
|
|
2]) /* metro module 15282, dependencies: [31, 27, 4502, 1880, 661, 1376, 33, 4501, 697, 6771, 566, 7040, 6275, 5475, 4573, 1244, 6766, 1948, 4578, 7954, 2] */;
|