114 lines
6.5 KiB
TypeScript
114 lines
6.5 KiB
TypeScript
/* Metro module 10466; source: modules/premium/native/gifting/PremiumGiftDMPurchaseSuccess.tsx; dependencies: [31, 27, 33, 4501, 697, 7669, 1484, 7633, 10382, 4578, 1244, 2288, 7642, 4573, 2] */
|
|
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import PremiumGiftingMessages from '../../gifting/PremiumGifting.messages.js'; /* Metro dependency 2288 */
|
|
import PremiumGiftBackgroundAnimationAndroid from './PremiumGiftBackgroundAnimation.android.tsx'; /* Metro dependency 7642 */
|
|
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 IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
|
|
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 GiftingBadgeExperimentModule from '../../gifting/experiments/GiftingBadgeExperiment.tsx'; /* Metro dependency 7633 */
|
|
import * as NativeGiftContextModule from '../../../payments/native/NativeGiftContext.tsx'; /* Metro dependency 7669 */
|
|
|
|
function _fun80994(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10652:6, offset: 0x01e93fd0, size: 297 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = JsxRuntimeModule;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.Fragment;
|
|
const env0_7 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const PX_24 = (Native).space.PX_24;
|
|
object.title = {marginTop: PX_24, textAlign: 'center'};
|
|
const PX_8 = (Native).space.PX_8;
|
|
object.description = {marginTop: PX_8, textAlign: 'center'};
|
|
const env0_8 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftDMPurchaseSuccess.tsx');
|
|
exports.default = PremiumGiftDMSuccessBody;
|
|
exports.PremiumGiftDMSuccessActions = PremiumGiftDMSuccessActions;
|
|
function PremiumGiftDMSuccessBody() { // fn#80995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10652:414, offset: 0x01e940f9, size: 320 bytes, params: 1, frame: 25
|
|
const styles = useStyles();
|
|
const useNativeGiftContext = NativeGiftContextModule.useNativeGiftContext;
|
|
const giftStyle = Reflect.apply(useNativeGiftContext, NativeGiftContextModule, []).giftStyle;
|
|
const jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
|
|
let value = PremiumGiftBackgroundAnimationAndroid;
|
|
value = (
|
|
<View>
|
|
{((Component) => <Component giftStyle={giftStyle} />)(value)}
|
|
</View>
|
|
);
|
|
const items2 = [value];
|
|
const Text = (TextModule).Text;
|
|
const intl = (IndexNativeModule).intl;
|
|
let string = intl.string;
|
|
const MqZXbv = (IndexNativeModule).t.MqZXbv;
|
|
items2[1] = (
|
|
<Text style={styles.title} variant="heading-lg/bold">
|
|
{Reflect.apply(string, intl, [MqZXbv])}
|
|
</Text>
|
|
);
|
|
string = intl.string;
|
|
const Y1keV0 = (IndexNativeModule).t.Y1keV0;
|
|
items2[2] = (
|
|
<Text style={styles.description} variant="text-md/medium">
|
|
{Reflect.apply(string, intl, [Y1keV0])}
|
|
</Text>
|
|
);
|
|
return (
|
|
<>
|
|
{items2}
|
|
</>
|
|
);
|
|
}
|
|
|
|
function PremiumGiftDMSuccessActions() { // fn#80996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10652:822, offset: 0x01e94239, size: 271 bytes, params: 1, frame: 21
|
|
const {onClose,
|
|
prePurchaseGiftingBadgeProgress} = (NativeGiftContextModule).useNativeGiftContext();
|
|
const value3 = (UseNavigationNativeModule).useNavigation();
|
|
const GiftingBadgeExperiment = (GiftingBadgeExperimentModule).GiftingBadgeExperiment;
|
|
const useConfig = GiftingBadgeExperiment.useConfig;
|
|
const enabled = Reflect.apply(useConfig, GiftingBadgeExperiment,
|
|
[{location: 'PremiumGiftDMSuccessActions'}]).enabled;
|
|
const value4 = enabled.useCallback(_fun80997, [enabled, prePurchaseGiftingBadgeProgress, value3, onClose]);
|
|
const Button = (ButtonNativeModule).Button;
|
|
const intl = (IndexNativeModule).intl;
|
|
return (
|
|
<Button
|
|
text={intl.string((PremiumGiftingMessages).bGKjmg)}
|
|
variant="primary"
|
|
onPress={value4}
|
|
/>
|
|
);
|
|
function _fun80997() { // fn#80997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10652:1082, offset: 0x01e94348, size: 100 bytes, params: 1, frame: 15
|
|
var binding;
|
|
var navigate;
|
|
var value2;
|
|
if (enabled) {
|
|
if (prePurchaseGiftingBadgeProgress != null) {
|
|
binding = env0_2;
|
|
navigate = binding.navigate;
|
|
value2 = environment.__proto__;
|
|
Reflect.apply(navigate, binding,
|
|
[(require(10382) /* metro dependency 10382: PremiumGiftModal */).PremiumGiftScreens.GIFTING_BADGE,
|
|
{currentProgress: prePurchaseGiftingBadgeProgress}]);
|
|
} else {
|
|
onClose();
|
|
}
|
|
} else {
|
|
onClose();
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun80994, 10466, [31, 27, 33, 4501, 697, 7669, 1484, 7633, 10382, 4578, 1244, 2288, 7642, 4573,
|
|
2]) /* metro module 10466, dependencies: [31, 27, 33, 4501, 697, 7669, 1484, 7633, 10382, 4578, 1244, 2288, 7642, 4573, 2] */;
|