105 lines
7.2 KiB
TypeScript
105 lines
7.2 KiB
TypeScript
/* Metro module 10458; source: modules/premium/native/gifting/PremiumGiftCustomization.tsx; dependencies: [57, 31, 27, 1880, 33, 4501, 697, 1484, 7669, 10459, 1244, 7641, 10460, 4573, 7678, 7680, 10461, 2] */
|
|
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import PremiumGiftBackgroundSelect from './PremiumGiftBackgroundSelect.tsx'; /* Metro dependency 7641 */
|
|
import PremiumGiftPurchaseButton from './PremiumGiftPurchaseButton.tsx'; /* Metro dependency 10461 */
|
|
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 UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
|
|
import * as PremiumConstantsModule from '../../PremiumConstants.tsx'; /* Metro dependency 1880 */
|
|
import * as NativeGiftContextModule from '../../../payments/native/NativeGiftContext.tsx'; /* Metro dependency 7669 */
|
|
import * as UseGiftingPromotionDefaultSelectionModule from '../../gifting/hooks/useGiftingPromotionDefaultSelection.tsx'; /* Metro dependency 10459 */
|
|
|
|
function _fun80951(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10644:6, offset: 0x01e9112d, size: 413 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactNativeModule;
|
|
const env0_5 = value.View;
|
|
const env0_6 = value.ScrollView;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_8 = value.jsx;
|
|
const env0_9 = value.Fragment;
|
|
const env0_10 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
|
|
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object.scrollViewContainer = {paddingBottom: PX_24};
|
|
const object4 = {};
|
|
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object4.marginTop = PX_24;
|
|
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object4.marginLeft = PX_16;
|
|
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object4.marginBottom = PX_8;
|
|
object4.fontSize = 14;
|
|
object.senderHeaderTitle = object4;
|
|
const env0_11 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftCustomization.tsx');
|
|
exports.default = PremiumGiftCustomization;
|
|
function PremiumGiftCustomization() { // fn#80952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10644:594, offset: 0x01e912ca, size: 779 bytes, params: 1, frame: 35
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const value2 = (UseNavigationNativeModule).useNavigation();
|
|
const styles = useStyles();
|
|
const value3 = (NativeGiftContextModule).useNativeGiftContext();
|
|
const recipientUser = value3.recipientUser;
|
|
const premiumType = value3.premiumType;
|
|
const value4 = (UseGiftingPromotionDefaultSelectionModule).useGiftingPromotionDefaultSelectionV2(value3.claimableRewards,
|
|
value3.selectedGiftingPromotionReward);
|
|
const [property, property2] = Module00057(ReactModule.useState(0), 2);
|
|
const value7 = ReactModule.useRef(null);
|
|
const value8 = ReactModule.useCallback(function() {
|
|
global.setTimeout(_fun80954, 100);
|
|
}, [property]);
|
|
const TIER_2 = PremiumTypes.TIER_2;
|
|
ReactModule.useEffect(_fun80955, [value2,
|
|
premiumType === TIER_2 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lG6a5x) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['t9uG/o'])]);
|
|
const items2 = [
|
|
((Component) => <Component />)(PremiumGiftBackgroundSelect),
|
|
];
|
|
items2[1] = ((Component) => <Component />)(importDefault(10460) /* metro dependency 10460: PremiumGiftDuration */);
|
|
items2[2] = recipientUser != null && <>{((Text) => <Text style={styles.senderHeaderTitle} variant="text-md/semibold">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.NlkxGS)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}{((Component) => <Component user={recipientUser} />)(importDefault(7678) /* metro dependency 7678: LockedRecipientField */)}{((Component) => <Component onFocusMessage={value8} setMessagePosition={property2} />)(importDefault(7680) /* metro dependency 7680: PremiumGiftCustomMessage */)}</>;
|
|
return (
|
|
<View style={styles.container}>
|
|
<ScrollView
|
|
ref={value7}
|
|
contentContainerStyle={styles.scrollViewContainer}
|
|
showsVerticalScrollIndicator={false}
|
|
>
|
|
<View>
|
|
{items2}
|
|
</View>
|
|
</ScrollView>
|
|
{((Component) => <Component defaultSelection={value4} />)(PremiumGiftPurchaseButton)}
|
|
</View>
|
|
);
|
|
function _fun80953() { // fn#80953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10644:915, offset: 0x01e915d5, size: 30 bytes, params: 1, frame: 13
|
|
global.setTimeout(_fun80954, 100);
|
|
function _fun80954() { // fn#80954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10644:932, offset: 0x01e915f3, size: 53 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
return env1_2.current?.scrollTo({y: env1_1, animated: true});
|
|
}
|
|
|
|
}
|
|
|
|
function _fun80955() { // fn#80955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10644:1139, offset: 0x01e91628, size: 100 bytes, params: 1, frame: 19
|
|
const binding = env0_0;
|
|
const setOptions = binding.setOptions;
|
|
const object = {};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
object.title = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['RMu0/q'],
|
|
{nitroTierName: Module00057});
|
|
Reflect.apply(setOptions, binding, [object]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun80951, 10458, [57, 31, 27, 1880, 33, 4501, 697, 1484, 7669, 10459, 1244, 7641, 10460, 4573, 7678,
|
|
7680, 10461,
|
|
2]) /* metro module 10458, dependencies: [57, 31, 27, 1880, 33, 4501, 697, 1484, 7669, 10459, 1244, 7641, 10460, 4573, 7678, 7680, 10461, 2] */;
|