111 lines
5.4 KiB
TypeScript
111 lines
5.4 KiB
TypeScript
/* Metro module 14697; source: modules/guild_sidebar/native/ChannelBadge.tsx; dependencies: [31, 27, 1949, 33, 4501, 632, 14698, 11819, 4573, 1856, 2] */
|
|
import LocaleStore from '../../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
|
|
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 TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
|
|
function _fun110877(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14894:6, offset: 0x0238acc2, size: 208 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
|
|
return {channelInfoContainer: {paddingStart: 4}};
|
|
});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guild_sidebar/native/ChannelBadge.tsx');
|
|
exports.default = ChannelBadge;
|
|
function ChannelBadge({mentionCount, isMentionLowImportance, isNewChannel, postsWithUnreadsCount, muted}) { // fn#110879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14894:305, offset: 0x0238ada5, size: 394 bytes, params: 2, frame: 25
|
|
var r0;
|
|
const Text = (TextModule).Text;
|
|
var value;
|
|
const styles = useStyles();
|
|
const locale = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([LocaleStore],
|
|
function() {
|
|
return LocaleStore.locale;
|
|
});
|
|
if (mentionCount == null) {
|
|
if (isNewChannel) {
|
|
var viewBindingProps = {style: styles.channelInfoContainer};
|
|
value = importDefault(11819) /* metro dependency 11819: NewBadge */;
|
|
value = (
|
|
<View {...viewBindingProps}>
|
|
{((Component) => <Component />)(value)}
|
|
</View>
|
|
);
|
|
r0 = value;
|
|
} else if (muted != null) {
|
|
if (muted) {
|
|
r0 = null;
|
|
} else if (postsWithUnreadsCount != null) {
|
|
if (postsWithUnreadsCount > 0) {
|
|
var viewBindingProps = {style: styles.channelInfoContainer};
|
|
value = require(1856) /* metro dependency 1856: NumberUtils */;
|
|
value = (
|
|
<View {...viewBindingProps}>
|
|
<Text variant="text-xs/semibold" color="text-muted">
|
|
{value.humanizeValue(postsWithUnreadsCount, locale)}
|
|
</Text>
|
|
</View>
|
|
);
|
|
r0 = value;
|
|
} else {
|
|
r0 = null;
|
|
}
|
|
} else {
|
|
r0 = null;
|
|
}
|
|
} else {
|
|
r0 = null;
|
|
}
|
|
} else if (mentionCount > 0) {
|
|
var viewBindingProps = {style: styles.channelInfoContainer};
|
|
value = importDefault(14698) /* metro dependency 14698: MentionsBadge */;
|
|
value = (
|
|
<View {...viewBindingProps}>
|
|
{((Component) => <Component mentionsCount={mentionCount} isMentionLowImportance={isMentionLowImportance} />)(value)}
|
|
</View>
|
|
);
|
|
r0 = value;
|
|
} else if (isNewChannel) {
|
|
var viewBindingProps = {style: styles.channelInfoContainer};
|
|
value = importDefault(11819) /* metro dependency 11819: NewBadge */;
|
|
value = (
|
|
<View {...viewBindingProps}>
|
|
{((Component) => <Component />)(value)}
|
|
</View>
|
|
);
|
|
r0 = value;
|
|
} else if (muted != null) {
|
|
if (muted) {
|
|
r0 = null;
|
|
} else if (postsWithUnreadsCount != null) {
|
|
if (postsWithUnreadsCount > 0) {
|
|
var viewBindingProps = {style: styles.channelInfoContainer};
|
|
value = require(1856) /* metro dependency 1856: NumberUtils */;
|
|
value = (
|
|
<View {...viewBindingProps}>
|
|
<Text variant="text-xs/semibold" color="text-muted">
|
|
{value.humanizeValue(postsWithUnreadsCount, locale)}
|
|
</Text>
|
|
</View>
|
|
);
|
|
r0 = value;
|
|
} else {
|
|
r0 = null;
|
|
}
|
|
} else {
|
|
r0 = null;
|
|
}
|
|
} else {
|
|
r0 = null;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun110877, 14697, [31, 27, 1949, 33, 4501, 632, 14698, 11819, 4573, 1856,
|
|
2]) /* metro module 14697, dependencies: [31, 27, 1949, 33, 4501, 632, 14698, 11819, 4573, 1856, 2] */;
|