72 lines
5.5 KiB
TypeScript
72 lines
5.5 KiB
TypeScript
/* Metro module 14589; source: modules/guild_sidebar/native/GuildActionRows.tsx; dependencies: [31, 27, 5096, 4605, 10980, 6600, 4865, 33, 4501, 697, 6941, 3968, 1365, 632, 5092, 5080, 11350, 1962, 11846, 11814, 1244, 12376, 2] */
|
|
function _fun110331(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14786:6, offset: 0x0237509a, size: 340 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
|
const newChannelsStore = importDefault(5096) /* metro dependency 5096: NewChannelsStore */;
|
|
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
|
|
const CHANNEL_MARGIN_VERTICAL = (require(10980) /* metro dependency 10980: RedesignChannelListConstants */).CHANNEL_MARGIN_VERTICAL;
|
|
const env0_7 = (require(6600) /* metro dependency 6600: GuildOnboardingConstants */).CHANNELS_AND_ROLES_MODAL_KEY;
|
|
const env0_8 = (require(4865) /* metro dependency 4865: ReadStateConstants */).ReadStateTypes;
|
|
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
|
|
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = createStylesModule.createStyles;
|
|
const object = {marginVertical: CHANNEL_MARGIN_VERTICAL, marginHorizontal: 8};
|
|
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
|
const env0_10 = Reflect.apply(createStyles, createStylesModule, [{container: object,
|
|
channelInfoContainer: {paddingStart: 4}}]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_sidebar/native/GuildActionRows.tsx');
|
|
exports.GuildRolesAndChannelsRow = GuildRolesAndChannelsRow;
|
|
}
|
|
|
|
function GuildRolesAndChannelsRow({guild, selected}) { // fn#110332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14786:505, offset: 0x023751ee, size: 695 bytes, params: 2, frame: 26
|
|
const styles = useStyles();
|
|
const value2 = (importDefault(6941) /* metro dependency 6941: useGuildOnboardingAvailable */)(guild);
|
|
const id = guild.id;
|
|
const dismissibleContentUnsafeUtilsModule = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
|
|
const UNSAFE_useIsDismissibleContentDismissed = dismissibleContentUnsafeUtilsModule.UNSAFE_useIsDismissibleContentDismissed;
|
|
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
|
const CHANNEL_BROWSER_NEW_BADGE_NUX = DismissibleContent.CHANNEL_BROWSER_NEW_BADGE_NUX;
|
|
const value3 = Reflect.apply(UNSAFE_useIsDismissibleContentDismissed, dismissibleContentUnsafeUtilsModule,
|
|
[CHANNEL_BROWSER_NEW_BADGE_NUX]);
|
|
const value4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ReadStateStore],
|
|
function() {
|
|
return ReadStateStore.hasUnread(guild.id, ReadStateTypes.GUILD_ONBOARDING_QUESTION);
|
|
});
|
|
const value5 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([NewChannelsStore],
|
|
function() {
|
|
return NewChannelsStore.getNewChannelIds(guild.id).size > require(dependencyMap[14]).MAX_NEW_CHANNELS_TO_SHOW;
|
|
});
|
|
const value6 = env0_3.useCallback(function() {
|
|
importDefault(dependencyMap[15]).pushLazy(require(dependencyMap[17])(dependencyMap[16], dependencyMap.paths),
|
|
{guildId: id}, CHANNELS_AND_ROLES_MODAL_KEY);
|
|
}, [id]);
|
|
const ChannelModes = (require(11846) /* metro dependency 11846: BaseChannelItem */).ChannelModes;
|
|
const DEFAULT = ChannelModes.DEFAULT;
|
|
const r8 = selected ? (require(11846) /* metro dependency 11846: BaseChannelItem */).ChannelModes.SELECTED : DEFAULT;
|
|
let r0 = value3 ? value4 : !value3;
|
|
r0 = !r0 ? value5 : r0;
|
|
const r4 = r0 ? <View style={styles.channelInfoContainer}>{((NewBadge) => <NewBadge />)((require(11814) /* metro dependency 11814: components */).NewBadge)}</View> : null;
|
|
const BaseChannelItem = importDefault(11846) /* metro dependency 11846: BaseChannelItem */;
|
|
const defaultImportProps = {onPress: value6, style: styles.container, accessible: true};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
defaultImportProps.accessibilityLabel = value2 ? Reflect.apply(string, intl, [t.h9mGOP]) : Reflect.apply(string,
|
|
intl, [t.et6wav]);
|
|
defaultImportProps.accessibilityState = {selected: selected};
|
|
defaultImportProps.mode = r8;
|
|
const BaseChannelName = (require(11846) /* metro dependency 11846: BaseChannelItem */).BaseChannelName;
|
|
string = intl.string;
|
|
defaultImportProps.name = <BaseChannelName name={value2 ? Reflect.apply(string, intl,
|
|
[t.h9mGOP]) : Reflect.apply(string, intl, [t.et6wav])} mode={r8} />;
|
|
const BaseChannelIcon = (require(11846) /* metro dependency 11846: BaseChannelItem */).BaseChannelIcon;
|
|
const ChannelListMagnifyingGlassIcon = (require(12376) /* metro dependency 12376: ChannelListMagnifyingGlassIcon */).ChannelListMagnifyingGlassIcon;
|
|
defaultImportProps.icon = <BaseChannelIcon mode={r8} IconComponent={ChannelListMagnifyingGlassIcon} />;
|
|
defaultImportProps.channelInfo = r4;
|
|
return <BaseChannelItem {...defaultImportProps} />;
|
|
}
|
|
|