99 lines
5.2 KiB
TypeScript
99 lines
5.2 KiB
TypeScript
/* Metro module 7547; source: modules/premium/native/SubscriptionAccountHoldNotice.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 1305, 7548, 4573, 1244, 3802, 4578, 2] */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
|
|
function _fun60686(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7725:6, offset: 0x0170a21a, size: 315 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = ReactNativeModule;
|
|
const env0_3 = value.Linking;
|
|
const env0_4 = value.View;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_6 = value.jsx;
|
|
const env0_7 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
|
|
const env0_8 = Reflect.apply(createStyles, value, [{container: {'padding': 8, 'margin': 8,
|
|
backgroundColor: BACKGROUND_SURFACE_HIGH}, textContainer: {flexDirection: 'row'}, icon: {marginRight: 4},
|
|
text: {'marginBottom': 8, 'flex': 1}}]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/premium/native/SubscriptionAccountHoldNotice.tsx');
|
|
exports.default = _default_60687;
|
|
function _default_60687({subscription}) { // fn#60687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7725:403, offset: 0x0170a355, size: 459 bytes, params: 2, frame: 30
|
|
var r0;
|
|
var items3;
|
|
var Text;
|
|
const intl = (IndexNativeModule).intl;
|
|
var format;
|
|
const t = (IndexNativeModule).t;
|
|
var property;
|
|
var object2;
|
|
var items2;
|
|
var value;
|
|
const styles = useStyles();
|
|
const status = subscription.status;
|
|
const ACCOUNT_HOLD = SubscriptionStatusTypes.ACCOUNT_HOLD;
|
|
if (status !== ACCOUNT_HOLD) {
|
|
r0 = null;
|
|
} else {
|
|
var viewBindingProps = {style: styles.container};
|
|
var viewBindingProps2 = {style: styles.textContainer};
|
|
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
|
value = (
|
|
<Icon
|
|
size={(require(1305) /* metro dependency 1305: native */).IconSizes.MEDIUM}
|
|
style={styles.icon}
|
|
source={importDefault(7548) /* metro dependency 7548 */}
|
|
/>
|
|
);
|
|
items3 = [value];
|
|
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
var textProps = {style: styles.text, variant: 'text-sm/medium'};
|
|
format = intl.format;
|
|
property = t['7I21Iz'];
|
|
object2 = {};
|
|
object2.endDate = subscription.currentPeriodEnd;
|
|
value = require(3802) /* metro dependency 3802: PremiumUtils */;
|
|
object2.planDescription = value.getDisplayName(subscription.planId);
|
|
items3[1] = (
|
|
<Text {...textProps}>
|
|
{Reflect.apply(format, intl, [property, object2])}
|
|
</Text>
|
|
);
|
|
value = (
|
|
<View {...viewBindingProps2}>
|
|
{items3}
|
|
</View>
|
|
);
|
|
items2 = [value];
|
|
items2[1] = ((Button) => <Button size="sm" text={intl.string(t.VJmUNy)} onPress={onPress_60688} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
|
|
value = (
|
|
<View {...viewBindingProps}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
function _default_60687OnPress() { // fn#60688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7725:886, owner: _default_60687.onPress, offset: 0x0170a520, size: 71 bytes, params: 1, frame: 15
|
|
let value = environment.__proto__;
|
|
const openURL = Linking.openURL;
|
|
value = require(3802) /* metro dependency 3802: PremiumUtils */;
|
|
const getExternalSubscriptionMethodUrl = value.getExternalSubscriptionMethodUrl;
|
|
return Reflect.apply(openURL, Linking, [Reflect.apply(getExternalSubscriptionMethodUrl, value,
|
|
[subscription.paymentGateway, 'PAYMENT_SOURCE_MANAGEMENT'])]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun60686, 7547, [31, 27, 661, 33, 4501, 697, 1305, 7548, 4573, 1244, 3802, 4578,
|
|
2]) /* metro module 7547, dependencies: [31, 27, 661, 33, 4501, 697, 1305, 7548, 4573, 1244, 3802, 4578, 2] */;
|