119 lines
5.7 KiB
TypeScript
119 lines
5.7 KiB
TypeScript
/* Metro module 12765; source: design/components/Sheet/native/PromoSheet.native.tsx; dependencies: [29, 31, 27, 33, 4501, 697, 1357, 8564, 6275, 4572, 8553, 4573, 2] */
|
|
function _fun97553(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12955:6, offset: 0x02188c4a, size: 338 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const env0_3 = ['title', 'description', 'illustration', 'graphic', 'gradientColor', 'actions'];
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_4 = importDefault(29) /* metro dependency 29 */;
|
|
const env0_5 = importAll(31) /* metro dependency 31 */;
|
|
const env0_6 = (require(27) /* metro dependency 27 */).View;
|
|
let value = require(33) /* metro dependency 33 */;
|
|
const env0_7 = value.jsx;
|
|
const env0_8 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const PROMO_SHEET_GRAPHIC_MAX_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.PROMO_SHEET_GRAPHIC_MAX_WIDTH;
|
|
const env0_9 = Reflect.apply(createStyles, value, [{content: {'paddingHorizontal': 20, 'position': 'relative'},
|
|
title: {textAlign: 'center'}, description: {textAlign: 'center'}, illustration: {'alignSelf': 'stretch',
|
|
'alignItems': 'center'}, graphic: {alignSelf: 'center', maxWidth: PROMO_SHEET_GRAPHIC_MAX_WIDTH}}]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/PromoSheet.native.tsx');
|
|
exports.PromoSheet = PromoSheet;
|
|
}
|
|
|
|
function PromoSheet(a0) { // fn#97554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12955:622, offset: 0x02188d9c, size: 611 bytes, params: 2, frame: 32
|
|
var r10;
|
|
var r19;
|
|
var r13;
|
|
var value5;
|
|
var Graphic;
|
|
var object;
|
|
const title = a0.title;
|
|
const description = a0.description;
|
|
const illustration = a0.illustration;
|
|
let graphic = a0.graphic;
|
|
const gradientColor = a0.gradientColor;
|
|
const actions = a0.actions;
|
|
var value;
|
|
const value2 = env0_4(a0, env0_3);
|
|
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('PromoSheet');
|
|
const styles = useStyles();
|
|
const value4 = env0_5.useMemo(_fun97555, [value3, gradientColor]);
|
|
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
|
const bottomSheetProps = {...value2};
|
|
bottomSheetProps['startExpanded'] = true;
|
|
bottomSheetProps['contentStyles'] = styles.content;
|
|
bottomSheetProps['backgroundComponent'] = value4;
|
|
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
|
if (value3) {
|
|
if (graphic != null) {
|
|
Graphic = (require(8553) /* metro dependency 8553: GraphicNative */).Graphic;
|
|
var graphicProps = {...graphic};
|
|
graphic = styles.graphic;
|
|
graphicProps['style'] = graphic;
|
|
r10 = <Graphic {...graphicProps} />;
|
|
} else {
|
|
value5 = null;
|
|
r10 = value5 != illustration ? <View style={styles.illustration}>{illustration}</View> : value5;
|
|
}
|
|
} else {
|
|
value5 = null;
|
|
r10 = value5 != illustration ? <View style={styles.illustration}>{illustration}</View> : value5;
|
|
}
|
|
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
const text = <Text variant={value3 ? 'heading-xl/semibold' : 'heading-xl/bold'} color="mobile-text-heading-primary" style={styles.title}>{title}</Text>;
|
|
const value11 = null;
|
|
if (value11 != description) {
|
|
object = {};
|
|
value = 'text-md/medium';
|
|
r19 = value3 ? 'redesign/heading-18/medium' : value;
|
|
object.variant = r19;
|
|
value = 'text-default';
|
|
r19 = value3 ? 'text-subtle' : value;
|
|
object.color = r19;
|
|
object.style = styles.description;
|
|
value = <Text {...object}>{description}</Text>;
|
|
r13 = value;
|
|
} else {
|
|
r13 = value11;
|
|
}
|
|
return (
|
|
<BottomSheet {...bottomSheetProps}>
|
|
<Stack spacing={24}>
|
|
{r10}
|
|
<Stack2>
|
|
{text}
|
|
{r13}
|
|
</Stack2>
|
|
{actions}
|
|
</Stack>
|
|
</BottomSheet>
|
|
);
|
|
}
|
|
|
|
function _fun97555() { // fn#97555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12955:790, offset: 0x02188fff, size: 35 bytes, params: 1, frame: 2
|
|
if (env0_1) {
|
|
if (gradientColor != null) {
|
|
return _fun97556;
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun97556(a0) { // fn#97556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12955:816, offset: 0x02189022, size: 133 bytes, params: 2, frame: 18
|
|
const value = environment.__proto__.__proto__;
|
|
const viewBindingProps = {...a0};
|
|
const ExpressiveGradient = (require(8564) /* metro dependency 8564: ExpressiveGradientNative */).ExpressiveGradient;
|
|
const gradientColorBinding = gradientColor;
|
|
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
|
return (
|
|
<View {...viewBindingProps}>
|
|
<ExpressiveGradient
|
|
offsetBottom={0.25}
|
|
color={gradientColorBinding}
|
|
backgroundColor={MOBILE_ACTIONSHEET_BACKGROUND}
|
|
/>
|
|
</View>
|
|
);
|
|
}
|
|
|