158 lines
7.6 KiB
TypeScript
158 lines
7.6 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] */
|
|
import ObjectWithoutProperties from '../../../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
|
|
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import MobileVisualRefreshExperiment from '../../../../modules/themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
|
|
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 StackNativeModule from '../../Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
|
|
import * as TextModule from '../../Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as BottomSheetNativeModule from './BottomSheet.native.tsx'; /* Metro dependency 6275 */
|
|
import * as ExpressiveGradientNativeModule from '../../ExpressiveGradient/native/ExpressiveGradient.native.tsx'; /* Metro dependency 8564 */
|
|
|
|
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});
|
|
let value = JsxRuntimeModule;
|
|
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 = (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}}]);
|
|
(FileImportTrackerModule).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 object2;
|
|
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 = ObjectWithoutProperties(a0, env0_3);
|
|
const value3 = (MobileVisualRefreshExperiment)('PromoSheet');
|
|
const styles = useStyles();
|
|
const value4 = ReactModule.useMemo(_fun97555, [value3, gradientColor]);
|
|
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
|
|
const bottomSheetProps = {...value2};
|
|
bottomSheetProps['startExpanded'] = true;
|
|
bottomSheetProps['contentStyles'] = styles.content;
|
|
bottomSheetProps['backgroundComponent'] = value4;
|
|
const Stack = (StackNativeModule).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 = (StackNativeModule).Stack;
|
|
const Text = (TextModule).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) {
|
|
object2 = {};
|
|
value = 'text-md/medium';
|
|
r19 = value3 ? 'redesign/heading-18/medium' : value;
|
|
object2.variant = r19;
|
|
value = 'text-default';
|
|
r19 = value3 ? 'text-subtle' : value;
|
|
object2.color = r19;
|
|
object2.style = styles.description;
|
|
value = (
|
|
<Text {...object2}>
|
|
{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 = (ExpressiveGradientNativeModule).ExpressiveGradient;
|
|
const gradientColorBinding = gradientColor;
|
|
const MOBILE_ACTIONSHEET_BACKGROUND = (Native).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
|
return (
|
|
<View {...viewBindingProps}>
|
|
<ExpressiveGradient
|
|
offsetBottom={0.25}
|
|
color={gradientColorBinding}
|
|
backgroundColor={MOBILE_ACTIONSHEET_BACKGROUND}
|
|
/>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun97553, 12765, [29, 31, 27, 33, 4501, 697, 1357, 8564, 6275, 4572, 8553, 4573,
|
|
2]) /* metro module 12765, dependencies: [29, 31, 27, 33, 4501, 697, 1357, 8564, 6275, 4572, 8553, 4573, 2] */;
|