95 lines
5.2 KiB
TypeScript
95 lines
5.2 KiB
TypeScript
/* Metro module 12824; source: design/void/RefreshEmptyState/native/RefreshEmptyState.tsx; dependencies: [31, 27, 661, 33, 4501, 6597, 697, 8002, 4578, 4002, 2] */
|
|
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import TextStyles from '../../../../modules/rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
|
|
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 SharedModule from '../../../shared.tsx'; /* Metro dependency 4002 */
|
|
|
|
function _fun97874(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13014:6, offset: 0x0219554e, size: 444 bytes, params: 8, frame: 29
|
|
const env0_0 = require;
|
|
const EmptyState_978752 = EmptyState_97875;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = ReactNativeModule;
|
|
const env0_3 = value.View;
|
|
const env0_4 = value.Image;
|
|
const Fonts = (ConstantsModule).Fonts;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {container: {'alignItems': 'center', 'justifyContent': 'center', 'padding': 16}};
|
|
const object2 = {};
|
|
const DISPLAY_SEMIBOLD = Fonts.DISPLAY_SEMIBOLD;
|
|
const MOBILE_TEXT_HEADING_PRIMARY = (Native).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
|
copyDataProperties(object2, TextStyles(DISPLAY_SEMIBOLD, MOBILE_TEXT_HEADING_PRIMARY, 16), undefined);
|
|
object2['textAlign'] = 'center';
|
|
object2['marginBottom'] = 8;
|
|
object.title = object2;
|
|
const object3 = {};
|
|
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
|
|
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
|
|
copyDataProperties(object3, TextStyles(PRIMARY_MEDIUM, TEXT_SUBTLE, 14), undefined);
|
|
object3['textAlign'] = 'center';
|
|
object.body = object3;
|
|
object.image = {marginBottom: 32};
|
|
object.cta = {'alignSelf': 'center', 'marginTop': 16};
|
|
const env0_7 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('design/void/RefreshEmptyState/native/RefreshEmptyState.tsx');
|
|
exports.default = EmptyState_978752;
|
|
exports.ThemedEmptyState = ThemedEmptyState;
|
|
function EmptyState_97875({source, title, body, containerStyle, imageStyle, titleStyle, bodyStyle, callToAction}) { // fn#97875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13014:535, offset: 0x0219570a, size: 411 bytes, params: 2, frame: 28
|
|
const styles = useStyles();
|
|
const items2 = [styles.container, containerStyle];
|
|
const items3 = [
|
|
source != null
|
|
? (
|
|
<Image source={source} style={[styles.image, imageStyle]} />
|
|
)
|
|
: null,
|
|
];
|
|
items3[1] = (
|
|
title != null
|
|
? ((Component) => <Component style={[styles.title,
|
|
titleStyle]}>{title}</Component>)(importDefault(8002) /* metro dependency 8002: LegacyText */)
|
|
: null
|
|
);
|
|
items3[2] = ((Component) => <Component style={[styles.body,
|
|
bodyStyle]}>{body}</Component>)(importDefault(8002) /* metro dependency 8002: LegacyText */);
|
|
items3[3] = (
|
|
callToAction != null
|
|
? (
|
|
<View style={styles.cta}>
|
|
{((Button) => <Button shrink text={callToAction.label} onPress={callToAction.onPress} size="sm" />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}
|
|
</View>
|
|
)
|
|
: null
|
|
);
|
|
return (
|
|
<View style={items2}>
|
|
{items3}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function ThemedEmptyState(a0) { // fn#97876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13014:1105, offset: 0x021958a5, size: 143 bytes, params: 2, frame: 20
|
|
const lightSource = a0.lightSource;
|
|
const darkSource = a0.darkSource;
|
|
const value = Object.create(null);
|
|
value.lightSource = 0;
|
|
value.darkSource = 0;
|
|
const value2 = copyDataProperties({}, a0, value, undefined);
|
|
const useThemeContext = SharedModule.useThemeContext;
|
|
const theme = Reflect.apply(useThemeContext, SharedModule, []).theme;
|
|
return <EmptyState_97875 source={SharedModule.isThemeLight(theme) ? lightSource : darkSource} {...value2} />;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun97874, 12824, [31, 27, 661, 33, 4501, 6597, 697, 8002, 4578, 4002,
|
|
2]) /* metro module 12824, dependencies: [31, 27, 661, 33, 4501, 6597, 697, 8002, 4578, 4002, 2] */;
|