Files
discord-decomp/sources/components_native/chat/ChatBeginningRow.tsx
T
2026-07-28 01:06:53 +03:00

1590 lines
86 KiB
TypeScript

/* Metro module 11926; source: components_native/chat/ChatBeginningRow.tsx; dependencies: [57, 5, 31, 27, 4502, 1378, 6865, 9113, 5189, 1383, 1422, 5109, 1379, 1935, 1945, 1867, 3784, 3793, 4864, 1878, 661, 1386, 11927, 11899, 8781, 33, 4501, 697, 6682, 1244, 6684, 6689, 6691, 4559, 4573, 3853, 3860, 5278, 11392, 1305, 11928, 8148, 9646, 566, 3995, 8206, 4020, 4805, 9088, 6863, 11089, 4048, 6622, 11929, 11930, 44, 21, 11932, 3856, 9112, 4660, 11936, 5586, 9151, 5930, 1948, 11937, 11940, 8153, 4603, 4578, 11944, 4497, 11945, 6779, 8092, 683, 10630, 8194, 6613, 6610, 3857, 4080, 11947, 1962, 6771, 11948, 8491, 8743, 6797, 8822, 8515, 6947, 5080, 8863, 6819, 8783, 8800, 8796, 8794, 10348, 7975, 4007, 8879, 3968, 1365, 11388, 5225, 9719, 10859, 4056, 11949, 11953, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import SnowflakeUtils from '../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import Module00044 from '../../by-id/module-00044.js'; /* Metro dependency 44 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import EmbeddedActivitiesStore from '../../modules/activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildChannelStore from '../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import GuildMemberStore from '../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import HelpdeskUtils from '../../utils/HelpdeskUtils.tsx'; /* Metro dependency 1948 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import RelationshipStore from '../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import UserUtils from '../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import UseTheme from '../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import ActionSheetActionCreators from '../../modules/action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import AccessibilityStore from '../../modules/a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UseChannelName from '../../modules/channel/useChannelName.tsx'; /* Metro dependency 4805 */
import UserGuildSettingsStore from '../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
import ModalActionCreators from '../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import AuthorizedAppsStore from '../../stores/AuthorizedAppsStore.tsx'; /* Metro dependency 5109 */
import UserProfileStore from '../../modules/user_profile/UserProfileStore.tsx'; /* Metro dependency 5189 */
import UseAnalyticsLocations from '../../modules/app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AuthorizedAppsActionCreators from '../../actions/AuthorizedAppsActionCreators.tsx'; /* Metro dependency 6779 */
import GuildIcon from '../../modules/guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
import ForumPostMessagesStore from '../../modules/forums/ForumPostMessagesStore.tsx'; /* Metro dependency 6865 */
import ChannelSettingsActionCreators from '../../actions/ChannelSettingsActionCreators.tsx'; /* Metro dependency 8148 */
import Module08194 from '../../by-id/module-08194.js'; /* Metro dependency 8194 */
import ShowUserProfileActionSheet from '../../modules/user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
import RelationshipActionCreators from '../../actions/RelationshipActionCreators.tsx'; /* Metro dependency 8783 */
import GuildSettingsStore from '../../modules/guild_settings/GuildSettingsStore.tsx'; /* Metro dependency 9113 */
import GroupDMAvatar from '../../modules/group_dm/native/GroupDMAvatar.tsx'; /* Metro dependency 9719 */
import UserSettingsAuthedAppDeleteWarningModal from '../../modules/user_settings/authorized_apps/native/UserSettingsAuthedAppDeleteWarningModal.tsx'; /* Metro dependency 11945 */
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 FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as Dismissible_contentModule from '../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as ChannelRecordModule from '../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
import * as ChannelConstantsModule from '../../modules/channel/ChannelConstants.tsx'; /* Metro dependency 1386 */
import * as GuildRecordModule from '../../records/GuildRecord.tsx'; /* Metro dependency 1422 */
import * as ToastUtilsModule from '../../modules/toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as UseTokenModule from '../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as DismissibleContentUnsafeUtilsModule from '../../modules/dismissible_content/DismissibleContentUnsafeUtils.tsx'; /* Metro dependency 3968 */
import * as UseAlertStoreNativeModule from '../../design/components/AlertModal/native/useAlertStore.native.tsx'; /* Metro dependency 4497 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as AuthorizedAppsStoreModule from '../../stores/AuthorizedAppsStore.tsx'; /* Metro dependency 5109 */
import * as FakePlaceholderPrivateChannelModule from '../../modules/channel/FakePlaceholderPrivateChannel.tsx'; /* Metro dependency 5225 */
import * as PressablesModule from '../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ClipboardUtilsNativeModule from '../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */
import * as GuildIconModule from '../../modules/guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
import * as ForumTagHooksModule from '../../modules/forums/ForumTagHooks.tsx'; /* Metro dependency 6863 */
import * as TransitionToGuildNativeModule from '../../modules/routing/transitionToGuild.native.tsx'; /* Metro dependency 6947 */
import * as RowButtonNativeModule from '../../design/components/TableRow/native/RowButton.native.tsx'; /* Metro dependency 7975 */
import * as EnhancedRoleColorUtilsModule from '../../modules/premium/enhanced_role_colors/native/EnhancedRoleColorUtils.tsx'; /* Metro dependency 8206 */
import * as UserProfileAnalyticsUtilsModule from '../../modules/user_profile/UserProfileAnalyticsUtils.tsx'; /* Metro dependency 8515 */
import * as RestrictionConfirmationConstantsModule from '../../modules/relationships/native/RestrictionConfirmationConstants.tsx'; /* Metro dependency 8781 */
import * as UserProfileAlertUtilsModule from '../../modules/user_profile/native/UserProfileAlertUtils.tsx'; /* Metro dependency 8796 */
import * as GuildIconPileNativeModule from '../../design/components/Pile/native/GuildIconPile.native.tsx'; /* Metro dependency 8863 */
import * as ChannelPermissionsUtilsModule from '../../modules/channel_permissions/ChannelPermissionsUtils.tsx'; /* Metro dependency 9088 */
import * as AppliedForumTagModule from '../../modules/forums/native/AppliedForumTag.tsx'; /* Metro dependency 11089 */
import * as MessageRequestConstantsModule from '../../modules/message_request/MessageRequestConstants.tsx'; /* Metro dependency 11899 */
import * as GuildProgressHooksModule from '../../modules/guild_progress/GuildProgressHooks.tsx'; /* Metro dependency 11930 */
import * as GuildProgressUtilsModule from '../../modules/guild_progress/native/GuildProgressUtils.tsx'; /* Metro dependency 11932 */
import * as UseDMMessageToReportModule from '../../modules/messages/useDMMessageToReport.tsx'; /* Metro dependency 11940 */
function _fun91451(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:6, offset: 0x02064c66, size: 1569 bytes, params: 8, frame: 28
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactNativeModule;
const env0_6 = value.ActivityIndicator;
const env0_7 = value.View;
value = require(661) /* metro dependency 661: Constants */;
const env0_25 = value.AnalyticEvents;
const env0_26 = value.AnalyticsPages;
const env0_27 = value.AnalyticsSections;
const env0_28 = value.ChannelSettingsSections;
const env0_29 = value.EMPTY_STRING_SNOWFLAKE_ID;
const env0_30 = value.GuildSettingsSections;
const env0_31 = value.HelpdeskArticles;
const env0_32 = value.InstantInviteSources;
const env0_33 = value.Permissions;
const env0_34 = value.RelationshipTypes;
const env0_35 = value.UPLOAD_MEDIUM_SIZE;
const env0_36 = value.WELCOME_OLD_GUILD_AGE_THRESHOLD;
value = require(11927) /* metro dependency 11927: GuildProgressConstants */;
const env0_38 = value.AnalyticsActions;
const env0_39 = value.AnalyticsSetupTypes;
value = require(33) /* metro dependency 33 */;
const env0_42 = value.jsx;
const env0_43 = value.Fragment;
const env0_44 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object = {container: {'position': 'absolute', 'paddingVertical': 8, 'paddingHorizontal': 12, 'width': '100%'}};
object.title = {marginTop: 16};
object.subtitle = {'marginBottom': 16, 'lineHeight': 20};
const object3 = {'borderRadius': null, 'marginTop': 16, 'width': '100%'};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.gdmInviteFriends = object3;
const object4 = {'borderRadius': null, 'marginTop': 8, 'width': '100%'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.gdmShareInviteLink = object4;
object.gdmShareInviteLinkNoRelationships = {marginTop: 16};
object.ctaLabel = {marginLeft: 8};
object.ctaContainer = {'flexDirection': 'row', 'flexWrap': 'wrap'};
object.ctaButton = {'flexDirection': 'row', 'alignItems': 'center'};
object.ctaAddRoles = {paddingRight: 24};
object.avatar = {marginBottom: 16};
object.avatarRedesign = {marginBottom: 16};
object.centerHeader = {'paddingHorizontal': 8, 'alignItems': 'center'};
object.gdmText = {textAlign: 'center'};
object.dmTitle = {'marginBottom': 8, 'textAlign': 'center'};
object.dmBeginningMessage = {marginTop: 8};
object.provisionalAccountExplainer = {marginTop: 12};
object.mutualGuildsLabel = {'marginTop': 8, 'marginLeft': 8, 'height': 26};
object.mutualGuildsContainer = {'flexDirection': 'row', 'alignItems': 'center', 'marginTop': 6};
const object9 = {'width': 64, 'height': 64, 'borderRadius': null, 'backgroundColor': null,
'justifyContent': 'center', 'alignItems': 'center'};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object9.backgroundColor = BACKGROUND_MOD_MUTED;
object.iconContainer = object9;
object.threadDetails = {lineHeight: 20};
object.threadCreatorRoleDot = {'paddingRight': 4, 'paddingTop': 2};
object.tagContainer = {'marginTop': 8, 'display': 'flex', 'flexDirection': 'row', 'flexWrap': 'wrap'};
const object10 = {'borderRadius': null, 'backgroundColor': null, 'height': 24, 'width': 24, 'padding': 4,
'alignContent': 'center'};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const STATUS_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_POSITIVE;
object10.backgroundColor = STATUS_POSITIVE;
object.unmutedNotificationContainer = object10;
object.unmutedNotification = {'width': 16, 'height': 16};
object.dmButtonRow = {'marginTop': 16, 'flexDirection': 'row', 'flexWrap': 'wrap', 'alignItems': 'center', 'gap': 8};
object.pendingIncoming = {'flexDirection': 'column', 'gap': 8};
object.pendingIncomingButtons = {'flexDirection': 'row', 'flexWrap': 'wrap', 'gap': 8};
object.appDMButtonIcon = {marginRight: 2};
object.formCtaIcon = {'width': 32, 'height': 32};
const env0_45 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/chat/ChatBeginningRow.tsx');
exports.default = ChatBeginningRow;
function ChatBeginningRowIcon(a0) { // fn#91452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:2625, offset: 0x02065287, size: 383 bytes, params: 2, frame: 20
const isPrivate = a0.isPrivate;
const isThread = a0.isThread;
a0.isNSFW;
const isForumPost = a0.isForumPost;
const styles = useStyles();
const object = {};
if (isForumPost) {
object.IconComponent = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon;
object.label = (require(1244) /* metro dependency 1244: indexNative */).t.Y4REmB;
} else if (isThread) {
object.IconComponent = (require(6684) /* metro dependency 6684: ThreadIcon */).ThreadIcon;
object.label = (require(1244) /* metro dependency 1244: indexNative */).t['7Xm5QI'];
} else if (isPrivate) {
object.IconComponent = (require(6689) /* metro dependency 6689: TextLockIcon */).TextLockIcon;
object.label = (require(1244) /* metro dependency 1244: indexNative */).t.GK18KJ;
} else {
object.IconComponent = (require(6691) /* metro dependency 6691: TextIcon */).TextIcon;
object.label = (require(1244) /* metro dependency 1244: indexNative */).t.GK18KJ;
}
const IconComponent = object.IconComponent;
return (
<View style={styles.iconContainer}>
<IconComponent
size="lg"
color="icon-strong"
accessibilityLabel={(require(1244) /* metro dependency 1244: indexNative */).intl.string(object.label)}
/>
</View>
);
}
function ChatBeginningRowHeader({title, subtitle, isPrivate, isThread, isNSFW, isForumPost, subtitleLink}) { // fn#91453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:3116, offset: 0x02065406, size: 371 bytes, params: 2, frame: 29
var r11;
var r5;
var object2;
const styles = useStyles();
const r13 = subtitleLink != null && (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
const jsxRuntimeEnv0_43Binding = jsxRuntimeEnv0_43;
const items2 = [
<ChatBeginningRowIcon
isNSFW={isNSFW}
isPrivate={isPrivate}
isThread={isThread}
isForumPost={isForumPost}
/>,
];
const Text = (TextModule).Text;
items2[1] = (
<Text
style={[styles.title, {marginBottom: isForumPost ? 0 : 8}]}
accessibilityRole="header"
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{title}
</Text>
);
const value8 = subtitle != null;
if (value8) {
object2 = {};
r11 = r13 ? 'link' : undefined;
object2.accessibilityRole = r11;
r11 = r13 ? _fun91454 : undefined;
object2.onPress = r11;
object2.style = styles.subtitle;
object2.variant = 'text-md/medium';
object2.color = 'text-default';
r5 = (
<Text {...object2}>
{subtitle}
</Text>
);
} else {
r5 = value8;
}
items2[2] = r5;
return (
<>
{items2}
</>
);
function _fun91454() { // fn#91454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:3617, offset: 0x02065579, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(3853) /* metro dependency 3853: Linking */;
return value.openURL(subtitleLink);
}
}
function LinkManageButtons({canManageRoles, canEdit, isPrivate, channel, theme}) { // fn#91455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:3727, offset: 0x020655a6, size: 730 bytes, params: 2, frame: 31
var r5;
const PressableOpacity = (PressablesModule).PressableOpacity;
var object;
var items2;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var object3;
var items6;
const styles = useStyles();
const useToken = UseTokenModule.useToken;
const TEXT_LINK = (Native).colors.TEXT_LINK;
const value2 = Reflect.apply(useToken, UseTokenModule, [TEXT_LINK, theme]);
let r6 = isPrivate && canManageRoles;
if (r6) {
var pressableOpacityProps = {accessibilityRole: 'button', onPress: onPress_91456, style: [styles.ctaButton,
styles.subtitle]};
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
items2 = [
<Icon
source={importDefault(11928) /* metro dependency 11928 */}
size={(require(1305) /* metro dependency 1305: native */).IconSizes.REFRESH_SMALL_16}
color={value2}
/>,
];
items2[1] = (
<Text
style={[styles.ctaLabel, styles.ctaAddRoles]}
variant="text-sm/medium"
color="text-link"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dMJ3Y6)}
</Text>
);
r6 = (
<PressableOpacity {...pressableOpacityProps}>
{items2}
</PressableOpacity>
);
}
if (canEdit) {
var pressableOpacityProps = {accessibilityRole: 'button', onPress: onPress_91457, style: [styles.ctaButton,
styles.subtitle]};
const PencilIcon = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
items6 = [
<PencilIcon size="xs" color={value2} />,
];
items6[1] = (
<Text
style={[styles.ctaLabel]}
variant="text-sm/medium"
color="text-link"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.GE1Tlo)}
</Text>
);
r5 = (
<PressableOpacity {...pressableOpacityProps}>
{items6}
</PressableOpacity>
);
} else {
r5 = canEdit;
}
return (
<View style={styles.ctaContainer}>
{r6}
{r5}
</View>
);
function LinkManageButtonsOnPress() { // fn#91456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:3986, owner: LinkManageButtons.onPress, offset: 0x02065880, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(11392) /* metro dependency 11392: ChannelPermissionsUtils */;
return value.openAddMembersActionSheet(channel);
}
function LinkManageButtonsOnPress_91457() { // fn#91457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:4367, owner: LinkManageButtons.onPress, offset: 0x020658ad, size: 80 bytes, params: 1, frame: 15
let value = environment.__proto__;
const defaultImport = ChannelSettingsActionCreators;
const setSection = defaultImport.setSection;
const OVERVIEW = ChannelSettingsSections.OVERVIEW;
Reflect.apply(setSection, defaultImport, [OVERVIEW]);
value = defaultImport;
value.open(channel.id);
}
}
function ThreadOwner({userId, guildId}) { // fn#91458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:4645, offset: 0x020658fd, size: 667 bytes, params: 2, frame: 28
const Text = (TextModule).Text;
var value;
const styles = useStyles();
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(userId);
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun91460);
const roleStyle = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.roleStyle;
});
let r2 = value3?.nick ?? (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(user);
const r4 = r2 ?? '???';
r2 = value3?.colorString ?? null;
let r5 = value3?.colorStrings ?? null;
const value7 = (EnhancedRoleColorUtilsModule).useProcessColorStringsArray(r5);
const useIsRoleStyleAndRoleColorsEligibleForERC = EnhancedRoleColorUtilsModule.useIsRoleStyleAndRoleColorsEligibleForERC;
if (roleStyle === 'username') {
r5 = r2 != null ? {color: r2} : undefined;
value = require(4020) /* metro dependency 4020: FabricUtils */;
return (
<Text
experimental_useNativeText={!value.isFabric()}
gradientColors={Reflect.apply(useIsRoleStyleAndRoleColorsEligibleForERC, EnhancedRoleColorUtilsModule,
[guildId, user?.id, roleStyle, value7]) ? value7 : undefined}
style={r5}
variant="text-md/semibold"
color="text-default"
>
{r4}
</Text>
);
}
return (
<>
{roleStyle === 'dot' && r2 != null && ((RoleDot) => <RoleDot color={r2} colors={r5} containerStyles={styles.threadCreatorRoleDot} />)((require(1305) /* metro dependency 1305: native */).RoleDot)}
<Text variant="text-md/semibold" color="text-default">
{r4}
</Text>
</>
);
function _fun91460() { // fn#91460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:4795, offset: 0x02065bb3, size: 45 bytes, params: 1, frame: 14
const userIdBinding = userId;
const value2 = null;
return value2 != userIdBinding ? GuildMemberStore.getMember(guildId, userId) : value2;
}
}
function ChatBeginningRowThread({channel}) { // fn#91462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:5595, offset: 0x02065bef, size: 635 bytes, params: 2, frame: 30
var r6;
var r0;
var jsxRuntimeEnv0_43Binding;
var isForumPost;
var items2;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const value2 = (UseChannelName)(channel);
const isPrivateGuildChannel2 = (ChannelPermissionsUtilsModule).isPrivateGuildChannel(channel);
const value3 = (ForumTagHooksModule).useAppliedTags(channel);
const useStateFromStoresObject = FluxModule.useStateFromStoresObject;
if (channel.threadMetadata == null) {
r0 = null;
} else {
jsxRuntimeEnv0_43Binding = jsxRuntimeEnv0_43;
items2 = [
<ChatBeginningRowHeader
isNSFW={channel.isNSFW()}
title={value2}
isPrivate={isPrivateGuildChannel2}
isThread
isForumPost={channel.isForumPost()}
/>,
];
isForumPost = channel.isForumPost;
r6 = (
Reflect.apply(isForumPost, channel, []) && value3.length > 0
? (
<View style={styles.tagContainer}>
{value3.map(_fun91464)}
</View>
)
: null
);
items2[1] = r6;
r6 = !channel.isForumPost() && <Text style={styles.threadDetails} variant="text-md/medium" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.imPXd5,
{usernameHook: usernameHook_91465})}</Text>;
items2[2] = r6;
isForumPost = channel.isForumPost;
r6 = (
Reflect.apply(isForumPost, channel, []) && Reflect.apply(useStateFromStoresObject, FluxModule,
[[ForumPostMessagesStore], function() {
return ForumPostMessagesStore.getMessage(channel.id);
}]).firstMessage == null
? (
<Text
style={styles.threadDetails}
variant="text-md/medium"
color="text-default"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mE3KJN)}
</Text>
)
: null
);
items2[3] = r6;
r0 = (
<>
{items2}
</>
);
}
return r0;
function _fun91464(a0) { // fn#91464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:6034, offset: 0x02065e8a, size: 58 bytes, params: 2, frame: 16
const AppliedForumTagPill = (AppliedForumTagModule).AppliedForumTagPill;
return <AppliedForumTagPill tag={a0} key={a0.id} />;
}
function ChatBeginningRowThreadUsernameHook(a0, a1) { // fn#91465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:6256, owner: ChatBeginningRowThread.usernameHook, offset: 0x02065ec4, size: 53 bytes, params: 3, frame: 15
const channelBinding = channel;
return (
<ThreadOwner
userId={channelBinding.ownerId}
guildId={channelBinding.guild_id}
key={a1}
/>
);
}
}
function ChatBeginningRowGuildNonDefaultChannel({guild, channel}) { // fn#91466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:6491, offset: 0x02065ef9, size: 571 bytes, params: 2, frame: 29
var r5;
var value;
const value2 = (UseChannelName)(channel, true);
const value3 = (UseChannelName)(channel, false);
let permissionStoreBinding = PermissionStore;
let can = permissionStoreBinding.can;
const MANAGE_CHANNELS = Permissions.MANAGE_CHANNELS;
const value4 = Reflect.apply(can, permissionStoreBinding, [MANAGE_CHANNELS, channel]);
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
const MANAGE_ROLES = Permissions.MANAGE_ROLES;
const value5 = Reflect.apply(can, permissionStoreBinding, [MANAGE_ROLES, channel]);
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
const READ_MESSAGE_HISTORY = Permissions.READ_MESSAGE_HISTORY;
const value6 = Reflect.apply(can, permissionStoreBinding, [READ_MESSAGE_HISTORY, channel]);
const isPrivateGuildChannel2 = (ChannelPermissionsUtilsModule).isPrivateGuildChannel(channel);
const value7 = (UseTheme)();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value8 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.q0tgLe,
{channelName: value2});
const r12 = isPrivateGuildChannel2 ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t.QuwqjG,
{channelName: value2,
topicHook: topicHook}) : value6 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.JHKUGB,
{channelName: value2}) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.hPVEQG,
{channelName: value3});
const jsxRuntimeEnv0_43Binding = jsxRuntimeEnv0_43;
const items2 = [
<ChatBeginningRowHeader
title={value8}
subtitle={r12}
isPrivate={isPrivateGuildChannel2}
/>,
];
items2[1] = (
<LinkManageButtons
canManageRoles={value5}
canEdit={value4}
isPrivate={isPrivateGuildChannel2}
channel={channel}
theme={value7}
/>
);
if (isPrivateGuildChannel2) {
if (value4) {
value = importDefault(11929) /* metro dependency 11929: ChannelAccessInfo */;
value = ((Component) => <Component channel={channel} guild={guild} />)(value);
r5 = value;
} else {
r5 = null;
}
} else {
r5 = null;
}
items2[2] = r5;
return (
<>
{items2}
</>
);
function topicHook() { // fn#91467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:6875, owner: ChatBeginningRowGuildNonDefaultChannel.topicHook, offset: 0x02066134, size: 66 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
const parseTopic = value.parseTopic;
const channelBinding = channel;
return Reflect.apply(parseTopic, value, [channelBinding.topic, true, {channelId: channelBinding.id}]);
}
}
function ChatBeginningRowGuild({guild, channel}) { // fn#91468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:7263, offset: 0x02066176, size: 180 bytes, params: 2, frame: 18
const defaultChannel = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildChannelStore],
function() {
return GuildChannelStore.getDefaultChannel(guild.id);
});
const permissionStoreBinding = PermissionStore;
const can = permissionStoreBinding.can;
const READ_MESSAGE_HISTORY = Permissions.READ_MESSAGE_HISTORY;
return (
Reflect.apply(can, permissionStoreBinding, [READ_MESSAGE_HISTORY, channel]) && defaultChannel?.id === channel.id
? (
<ChatBeginningRowGuildDefaultChannel guild={guild} channel={channel} />
)
: (
<ChatBeginningRowGuildNonDefaultChannel guild={guild} channel={channel} />
)
);
}
function DMSpamButton({channel, user, showingSpamBanner}) { // fn#91470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:9802, offset: 0x0206624a, size: 247 bytes, params: 2, frame: 22
const Button = (ButtonNativeModule).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value2 = (UseDMMessageToReportModule).useDMMessageToReport(channel,
user.id, user.bot === true);
const message = value2.message;
if (!showingSpamBanner) {
if (value2.isReportable) {
if (message != null) {
return (
<Button
size="sm"
variant="destructive"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.HHZmDn)}
disabled={message == null}
onPress={onPress_91471}
/>
);
}
if (value2.isLoaded) {
return null;
}
return (
<Button
size="sm"
variant="destructive"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.HHZmDn)}
disabled={message == null}
onPress={onPress_91471}
/>
);
}
}
return null;
function DMSpamButtonOnPress() { // fn#91471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:10122, owner: DMSpamButton.onPress, offset: 0x02066341, size: 67 bytes, params: 1, frame: 13
var environment;
var value2;
var moduleValue;
if (message != null) {
value2 = environment.__proto__;
moduleValue = require(8153) /* metro dependency 8153: ReportModals */;
moduleValue.showReportModalForFirstDM(message, _fun91472);
}
function _fun91472() { // fn#91472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:10174, offset: 0x02066384, size: 53 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
value.closePrivateChannel(channel.id, true);
}
}
}
function ManageAppButton({user, application, channel, oauth2Token}) { // fn#91473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:10223, offset: 0x020663b9, size: 341 bytes, params: 2, frame: 23
var r0;
var Button;
var intl;
const styles = useStyles();
const env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
function() {
return EmbeddedActivitiesStore.getSelfEmbeddedActivities();
});
if (user.bot) {
if (application != null) {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = (
<Button
size="sm"
variant="secondary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5S3sQF'])}
icon={((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} source={importDefault(11944) /* metro dependency 11944 */} style={styles.appDMButtonIcon} />)((require(1305) /* metro dependency 1305: native */).Icon)}
onPress={onPress_91475}
/>
);
} else {
r0 = null;
}
} else {
r0 = null;
}
return r0;
function ManageAppButtonOnPress() { // fn#91475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:10599, owner: ManageAppButton.onPress, offset: 0x02066521, size: 181 bytes, params: 1, frame: 21
const openAlert = UseAlertStoreNativeModule.openAlert;
const applicationBinding = application;
Reflect.apply(openAlert, UseAlertStoreNativeModule, ['confirm-delete-authed-app',
<UserSettingsAuthedAppDeleteWarningModal application={applicationBinding} scopes={oauth2Token.scopes} onDelete={onDelete} />]);
const defaultImport2 = AnalyticsUtils;
const track = defaultImport2.track;
const APP_MANAGE_CTA_CLICKED = AnalyticEvents.APP_MANAGE_CTA_CLICKED;
const channelBinding = channel;
Reflect.apply(track, defaultImport2, [APP_MANAGE_CTA_CLICKED, {application_id: applicationBinding.id,
channel_id: channelBinding.id, channel_type: channelBinding.type}]);
function onDelete() { // fn#91476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:10702, owner: ManageAppButton.onPress.onDelete, offset: 0x020665d6, size: 130 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__;
value = undefined;
(AuthorizedAppsActionCreators).delete(oauth2Token.id);
const value3 = selfEmbeddedActivities.get(application.id);
(importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).leaveActivity({location: value3 == null ? value : value3.location,
applicationId: application.id});
return value;
}
}
}
function MuteAppButton({channel, user}) { // fn#91477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:10938, offset: 0x02066658, size: 411 bytes, params: 2, frame: 25
var r6;
var r0;
var Button;
var intl;
var string;
var t;
var Icon;
const styles = useStyles();
const moduleValue = require(dependencyMap[43]);
const useStateFromStores = moduleValue.useStateFromStores;
let object = [UserGuildSettingsStore];
const value3 = Reflect.apply(useStateFromStores, moduleValue, [object, function() {
return UserGuildSettingsStore.isChannelMuted(null, channel.id);
}]);
if (user.bot) {
Button = require(dependencyMap[70]).Button;
object = {size: 'sm'};
r6 = value3 ? 'secondary' : 'destructive';
object.variant = r6;
intl = require(dependencyMap[29]).intl;
string = intl.string;
t = require(dependencyMap[29]).t;
r6 = value3 ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl, [t.w4m945]);
object.text = r6;
Icon = require(dependencyMap[39]).Icon;
object.icon = (
<Icon
size={require(dependencyMap[39]).Icon.Sizes.SMALL}
source={importDefault(value3 ? dependencyMap[77] : dependencyMap[78])}
color={value3 ? undefined : importDefault(dependencyMap[27]).unsafe_rawColors.WHITE}
style={styles.appDMButtonIcon}
/>
);
object.onPress = onPress_91479;
r0 = <Button {...object} />;
} else {
r0 = null;
}
return r0;
function MuteAppButtonOnPress() { // fn#91479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:11383, owner: MuteAppButton.onPress, offset: 0x02066816, size: 286 bytes, params: 1, frame: 21
var defaultImport;
var object;
var defaultImport2;
var open;
var intl;
var defaultImport3;
if (env0_2) {
defaultImport2 = importDefault(dependencyMap[79]);
defaultImport2.updateChannelOverrideSettings(null, channel.id, {muted: false},
require(dependencyMap[80]).NotificationLabels.Unmuted);
defaultImport3 = importDefault(dependencyMap[81]);
open = defaultImport3.open;
object = {key: 'NOTIFICATIONS_UNMUTED'};
intl = require(dependencyMap[29]).intl;
object.content = intl.string(require(dependencyMap[29]).t['/6kulz']);
object.icon = icon_91480;
Reflect.apply(open, defaultImport3, [object]);
} else {
defaultImport = importDefault(dependencyMap[82]);
defaultImport.openLazy(require(dependencyMap[84])(dependencyMap[83], dependencyMap.paths),
'MessageNotificationChannelActionSheet', {channel: channel});
}
function onPressIcon_91480() { // fn#91480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:11587, owner: MuteAppButton.onPress.icon, offset: 0x02066934, size: 138 bytes, params: 1, frame: 20
const stylesBinding = styles;
const unmutedNotificationContainer = stylesBinding.unmutedNotificationContainer;
const Icon = (NativeModule).Icon;
const iconProps = {source: Module08194};
const WHITE = (Native).unsafe_rawColors.WHITE;
iconProps.color = WHITE;
iconProps.style = stylesBinding.unmutedNotification;
return (
<View style={unmutedNotificationContainer}>
<Icon {...iconProps} />
</View>
);
}
}
}
function ChatBeginningRowDM({channel, showingSpamBanner}) { // fn#91481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:11851, offset: 0x020669be, size: 1557 bytes, params: 2, frame: 40
var r6;
var object;
const onPress_914822 = onPress_91482;
const styles = useStyles();
const env0_2 = (UseAnalyticsLocations)().analyticsLocations;
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(channel.getRecipientId());
});
const value4 = (importDefault(11948) /* metro dependency 11948: getApplicationFromBotUserId */)(user?.id ?? EMPTY_STRING_SNOWFLAKE_ID);
const {authorizedAppToken,
authorizedAppsFetchState} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([AuthorizedAppsStore],
_fun91484);
const authorizedAppsFetchState2 = authorizedAppsFetchState;
const env0_6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore], _fun91485,
[user]);
const isSystemDM2 = channel.isSystemDM();
authorizedAppsFetchState2.useEffect(_fun91486, [user, channel]);
authorizedAppsFetchState2.useEffect(_fun91487, [user?.bot, authorizedAppToken, authorizedAppsFetchState]);
if (user == null) {
return null;
}
const userTag = (UserUtils).getUserTag(user,
{'decoration': 'never', 'identifiable': 'always'});
const name = (UserUtils).getName(user);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const Rzvnig = (require(1244) /* metro dependency 1244: indexNative */).t.Rzvnig;
const r11 = isSystemDM2 ? Reflect.apply(string, intl,
[Rzvnig]) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Q56TRC,
{username: name});
const dMSpamButton = (
<DMSpamButton
channel={channel}
user={user}
showingSpamBanner={showingSpamBanner}
/>
);
const jsxRuntimeEnv0_43Binding = jsxRuntimeEnv0_43;
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {accessibilityRole: 'button', onPress: onPress_91499,
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iXAna6)};
const Avatar = (NativeModule).Avatar;
const guild_id = channel.guild_id;
const AvatarSizes = (NativeModule).AvatarSizes;
const XXLARGE = AvatarSizes.XXLARGE;
const items2 = [
<PressableOpacity {...pressableOpacityProps}>
<Avatar
style={styles.avatar}
user={user}
guildId={guild_id}
size={XXLARGE}
avatarDecoration={user.avatarDecoration}
/>
</PressableOpacity>,
];
string = intl.string;
const y5MwJy = (require(1244) /* metro dependency 1244: indexNative */).t.y5MwJy;
const Text = (TextModule).Text;
items2[1] = (
<PressableOpacity
accessibilityRole="button"
onPress={onPress_914822}
accessibilityHint={Reflect.apply(string, intl, [y5MwJy])}
>
<Text variant="heading-xxl/extrabold" color="mobile-text-heading-primary">
{name}
</Text>
</PressableOpacity>
);
if (user.isProvisional) {
r6 = null;
} else {
r6 = (
<PressableOpacity
accessibilityRole="button"
onPress={onPress_914822}
accessibilityHint={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y5MwJy)}
>
<Text variant="heading-lg/medium" color="text-default">
{userTag}
</Text>
</PressableOpacity>
);
}
items2[2] = r6;
items2[3] = (
<Text
style={styles.dmBeginningMessage}
variant="text-md/medium"
color="text-default"
>
{r11}
</Text>
);
items2[4] = (
user.isProvisional
? ((ChatProvisionalAccountExplainerCard) => <ChatProvisionalAccountExplainerCard style={styles.provisionalAccountExplainer} userId={user.id} iconSize={14} />)((require(10348) /* metro dependency 10348: ProvisionalAccountExplainer */).ChatProvisionalAccountExplainerCard)
: null
);
items2[5] = _fun91500();
items2[6] = (
<View style={styles.dmButtonRow}>
{
user.isNonUserBot()
? null
: (
user.bot
? (
<>
{
authorizedAppToken != null && value4 != null
? (
<>
<MuteAppButton channel={channel} user={user} />
<ManageAppButton
user={user}
application={value4}
channel={channel}
oauth2Token={authorizedAppToken}
/>
</>
)
: null
}
{dMSpamButton}
</>
)
: (
<RelationshipButtons reportButton={dMSpamButton} />
)
)
}
</View>
);
return (
<>
{items2}
</>
);
function ChatBeginningRowDMOnPress() { // fn#91482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:12740, owner: ChatBeginningRowDM.onPress, offset: 0x02066fd3, size: 67 bytes, params: 1, frame: 14
const value = environment.__proto__;
(ClipboardUtilsNativeModule).copy(env0_7);
(ToastUtilsModule).presentUsernameCopied();
}
function _fun91484() { // fn#91484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:12114, offset: 0x0206703b, size: 73 bytes, params: 1, frame: 15
const object = {};
object.authorizedAppToken = AuthorizedAppsStore.getNewestTokenForApplication(Module00005?.id);
object.authorizedAppsFetchState = AuthorizedAppsStore.getFetchState();
return object;
}
function _fun91485() { // fn#91485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:12325, offset: 0x02067084, size: 45 bytes, params: 1, frame: 12
const userBinding = user;
const value2 = null;
return value2 != userBinding ? UserProfileStore.getMutualGuilds(user.id) : value2;
}
function _fun91486() { // fn#91486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:12405, offset: 0x020670b1, size: 109 bytes, params: 1, frame: 18
var value2;
var value3;
var defaultImport;
let userBinding = user;
if (userBinding != null) {
value2 = environment.__proto__;
value3 = undefined;
defaultImport = importDefault(8491) /* metro dependency 8491: maybeFetchUserProfile */;
userBinding = user;
defaultImport(userBinding.id, userBinding.getAvatarURL(channel == null ? value3 : channel.guild_id, 80),
{'withMutualGuilds': true, 'dispatchWait': true});
}
}
function _fun91487() { // fn#91487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:12539, offset: 0x0206711e, size: 92 bytes, params: 1, frame: 11
var authorizedAppsFetchStateBinding;
var value;
let r0 = user != null && user.bot;
if (r0) {
authorizedAppsFetchStateBinding = authorizedAppsFetchState;
value = environment.__proto__;
value = authorizedAppsFetchStateBinding === FetchState.NOT_FETCHED;
r0 = value;
}
if (r0) {
value = environment.__proto__;
value = importDefault(6779) /* metro dependency 6779: AuthorizedAppsActionCreators */;
value.fetch();
}
}
function handleOpenMutualGuilds() { // fn#91488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:12965, owner: ChatBeginningRowDM.handleOpenMutualGuilds, offset: 0x0206717a, size: 107 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[82]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[84]);
value = value(dependencyMap[90], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MutualGuildsActionSheet', {user: user,
onPressMutualGuild: onPressMutualGuild_91489}]);
function handleOpenMutualGuildsOnPressMutualGuild(a0) { // fn#91489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:13065, owner: ChatBeginningRowDM.handleOpenMutualGuilds.onPressMutualGuild, offset: 0x020671e5, size: 129 bytes, params: 2, frame: 16
(UserProfileAnalyticsUtilsModule).trackUserProfileAction({action: 'PRESS_MUTUAL_GUILD'});
(TransitionToGuildNativeModule).transitionToGuild(a0);
(ActionSheetActionCreators).hideActionSheet();
(ModalActionCreators).popWithKey(MOBILE_MESSAGE_REQUESTS_MODAL_KEY);
}
}
function RelationshipButtons({reportButton}) { // fn#91490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:13236, owner: ChatBeginningRowDM.RelationshipButtons, offset: 0x02067266, size: 1315 bytes, params: 2, frame: 32
var environment;
var stylesBinding;
var Text;
var format;
var uIomXw;
var defaultImport;
var items2;
var items3;
const value = environment.__proto__;
const useStateFromStores = FluxModule.useStateFromStores;
let object = [RelationshipStore];
const relationshipType = Reflect.apply(useStateFromStores, FluxModule, [object, function() {
return RelationshipStore.getRelationshipType(user.id);
}]);
const closure = function() {
importDefault(dependencyMap[82]).openLazy(require(dependencyMap[84])(dependencyMap[99], dependencyMap.paths),
BLOCK_CONFIRMATION_ACTION_SHEET_KEY, {userId: user.id, channelId: channel.id});
};
const Button = (ButtonNativeModule).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const button = (
<Button
text={Reflect.apply(string, intl, [t.l4Emac])}
size="sm"
variant="secondary"
onPress={closure}
/>
);
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
if (relationshipType === PENDING_INCOMING) {
object = {};
stylesBinding = styles;
object.style = stylesBinding.pendingIncoming;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
format = intl.format;
uIomXw = t.uIomXw;
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
items2 = [
<Text variant="text-sm/normal" color="text-default">
{Reflect.apply(format, intl, [uIomXw, {username: defaultImport.getName(user)}])}
</Text>,
];
var viewBinding2Props = {style: stylesBinding.pendingIncomingButtons};
string = intl.string;
items3 = [
<Button
text={Reflect.apply(string, intl, [t['+WbSn5']])}
size="sm"
variant="active"
onPress={function() {
importDefault(dependencyMap[97]).maybeConfirmFriendRequestAccept({userId: user.id,
location: AnalyticsPages.DM_CHANNEL});
}}
/>,
];
string = intl.string;
items3[1] = (
<Button
text={Reflect.apply(string, intl, [t.rQSndv])}
size="sm"
variant="secondary"
onPress={onPress_91498}
/>
);
string = intl.string;
items3[2] = (
<Button
text={Reflect.apply(string, intl, [t.l4Emac])}
size="sm"
variant="secondary"
onPress={closure}
/>
);
items3[3] = reportButton;
items2[1] = (
<View {...viewBinding2Props}>
{items3}
</View>
);
return (
<View {...object}>
{items2}
</View>
);
}
const jsxRuntimeEnv1_43Binding = jsxRuntimeEnv1_43;
const NONE = RelationshipTypes.NONE;
const r5 = (
NONE === relationshipType
? (
user == null
? (
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['PMsq/b'])}
size="sm"
variant="active"
onPress={function() {
importDefault(dependencyMap[96]).addRelationship({userId: user.id,
context: {location: AnalyticsPages.DM_CHANNEL}});
}}
/>
)
: (
user.bot
? null
: (
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['PMsq/b'])}
size="sm"
variant="active"
onPress={onPress_91492}
/>
)
)
)
: (
RelationshipTypes.FRIEND === relationshipType
? (
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cvSt1J)}
size="sm"
variant="secondary"
onPress={onPress_91493}
/>
)
: (
RelationshipTypes.BLOCKED === relationshipType
? (
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XyHpKH)}
size="sm"
variant="secondary"
onPress={onPress_91496}
/>
)
: (
RelationshipTypes.PENDING_OUTGOING !== relationshipType
? null
: (
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xMH6vD)}
size="sm"
variant="active"
disabled
onPress={undefined}
/>
)
)
)
)
);
const BLOCKED = RelationshipTypes.BLOCKED;
return (
<>
{r5}
{relationshipType === BLOCKED ? null : button}
{reportButton}
</>
);
function RelationshipButtonsOnPress() { // fn#91492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:13346, owner: ChatBeginningRowDM.RelationshipButtons.onPress, offset: 0x020677a9, size: 76 bytes, params: 1, frame: 14
const defaultImport = RelationshipActionCreators;
const addRelationship = defaultImport.addRelationship;
const DM_CHANNEL = AnalyticsPages.DM_CHANNEL;
Reflect.apply(addRelationship, defaultImport, [{userId: user.id, context: {location: DM_CHANNEL}}]);
}
function RelationshipButtonsOnPress_91493() { // fn#91493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:13443, owner: ChatBeginningRowDM.RelationshipButtons.onPress, offset: 0x020677f5, size: 93 bytes, params: 1, frame: 15
var environment;
let value = environment.__proto__.__proto__;
const confirmRemoveFriend = UserProfileAlertUtilsModule.confirmRemoveFriend;
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
const getName = value.getName;
Reflect.apply(confirmRemoveFriend, UserProfileAlertUtilsModule, [{userDisplayName: Reflect.apply(getName, value,
[user]), onConfirm: function() {
importDefault(dependencyMap[96]).removeFriend(user.id, {location: AnalyticsPages.DM_CHANNEL});
}}]);
}
function RelationshipButtonsOnPress_91496() { // fn#91496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:13691, owner: ChatBeginningRowDM.RelationshipButtons.onPress, offset: 0x02067902, size: 67 bytes, params: 1, frame: 15
const defaultImport = RelationshipActionCreators;
const unblockUser = defaultImport.unblockUser;
const id = user.id;
const DM_CHANNEL = AnalyticsPages.DM_CHANNEL;
Reflect.apply(unblockUser, defaultImport, [id, {location: DM_CHANNEL}]);
}
function RelationshipButtonsOnPress_91498() { // fn#91498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:14419, owner: ChatBeginningRowDM.RelationshipButtons.onPress, offset: 0x0206798b, size: 67 bytes, params: 1, frame: 15
const defaultImport = RelationshipActionCreators;
const cancelFriendRequest = defaultImport.cancelFriendRequest;
const id = user.id;
const DM_CHANNEL = AnalyticsPages.DM_CHANNEL;
Reflect.apply(cancelFriendRequest, defaultImport, [id, {location: DM_CHANNEL}]);
}
}
function ChatBeginningRowDMOnPress_91499() { // fn#91499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:15459, owner: ChatBeginningRowDM.onPress, offset: 0x020679ce, size: 72 bytes, params: 1, frame: 13
const value = environment.__proto__;
(ShowUserProfileActionSheet)({userId: user.id,
channelId: channel.id, sourceAnalyticsLocations: analyticsLocations});
}
function _fun91500() { // fn#91500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:16469, offset: 0x02067a16, size: 387 bytes, params: 1, frame: 25
if (env0_6 == null) {
return undefined;
}
let length = env0_6.length;
if (length < 1) {
return undefined;
}
length = env0_6.length;
const binding = env0_6;
const value2 = 5;
const value4 = binding.slice(0, length > value2 ? 4 : value2);
const PressableOpacity = (PressablesModule).PressableOpacity;
const handleOpenMutualGuildsBinding = handleOpenMutualGuilds;
const stylesBinding = styles;
const mutualGuildsContainer = stylesBinding.mutualGuildsContainer;
const GuildIconPile = (GuildIconPileNativeModule).GuildIconPile;
const GuildIconSizes = (GuildIconModule).GuildIconSizes;
const SMALL = GuildIconSizes.SMALL;
const guildIconPile = (
<GuildIconPile
size={SMALL}
names={value4.map(function(a0) {
return a0.guild.name;
})}
totalCount={length}
>
{value4.map(_fun91502)}
</GuildIconPile>
);
const Text = (TextModule).Text;
const mutualGuildsLabel = stylesBinding.mutualGuildsLabel;
const intl = (IndexNativeModule).intl;
return (
<PressableOpacity
accessibilityRole="button"
onPress={handleOpenMutualGuildsBinding}
style={mutualGuildsContainer}
>
{guildIconPile}
<Text
style={mutualGuildsLabel}
variant="text-sm/medium"
color="text-default"
>
{intl.format((IndexNativeModule).t.eE3oep, {count: length})}
</Text>
</PressableOpacity>
);
function _fun91502({guild}) { // fn#91502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:16796, offset: 0x02067ba8, size: 86 bytes, params: 2, frame: 19
const GuildIconSizes = (GuildIconModule).GuildIconSizes;
const SMALL = GuildIconSizes.SMALL;
return (
<GuildIcon
guild={guild}
size={SMALL}
key={guild.id}
/>
);
}
}
}
function ChatBeginningRowButton({title, subtitle, IconComponent, iconVariant, style, onPress, trailing}) { // fn#91503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:17302, offset: 0x02067bfe, size: 172 bytes, params: 2, frame: 26
const RowButton = (RowButtonNativeModule).RowButton;
const RowButton2 = (RowButtonNativeModule).RowButton;
const Icon = RowButton2.Icon;
return (
<View style={style}>
<RowButton
onPress={onPress}
icon={<Icon IconComponent={IconComponent} variant={iconVariant} />}
label={title}
subLabel={subtitle}
trailing={trailing}
/>
</View>
);
}
function ChatBeginningRowGroupDM({channel}) { // fn#91504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:17572, offset: 0x02067caa, size: 1145 bytes, params: 2, frame: 34
var r12;
var r10;
var r5;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var jsxRuntimeEnv0_43Binding;
var items2;
var object;
var value;
const styles = useStyles();
const value2 = (UseChannelName)(channel);
const [property, property2] = Module00057(ReactModule.useState(false), 2);
const value5 = (FluxModule).useStateFromStores([RelationshipStore], _fun91505);
const value6 = ReactModule.useCallback(function() {
require(dependencyMap[102]).navigateToNewGroupDM(channel.id, AnalyticsSections.CHANNEL_TEXT_AREA);
}, [channel]);
const value8 = ReactModule.useCallback(Module00005(_fun91508), [channel, property, property2]);
const value9 = ReactModule.useCallback(_fun91509, [value6]);
const value10 = ReactModule.useCallback(_fun91510, [value8]);
const id = channel.id;
const FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID = (FakePlaceholderPrivateChannelModule).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID;
const value11 = id === FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID;
const AvatarSizes = (NativeModule).AvatarSizes;
const XXLARGE = AvatarSizes.XXLARGE;
const items3 = [
<GroupDMAvatar
style={styles.avatarRedesign}
channel={channel}
size={XXLARGE}
accessible={false}
/>,
];
const Text = (TextModule).Text;
items3[1] = (
<Text
style={styles.dmTitle}
variant={value2 != null && value2.length > 40 ? 'heading-lg/extrabold' : 'heading-xxl/extrabold'}
color="mobile-text-heading-primary"
>
{value2}
</Text>
);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[2] = (
<Text
style={styles.gdmText}
variant="text-md/medium"
color="text-default"
>
{value11 ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t.MFwcqO,
{name: value2}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0Q7uk0'])}
</Text>
);
if (value11) {
r5 = null;
} else {
jsxRuntimeEnv0_43Binding = jsxRuntimeEnv0_43;
if (value5) {
r12 = (
<ChatBeginningRowButton
style={styles.gdmInviteFriends}
onPress={value9}
IconComponent={(require(10859) /* metro dependency 10859: GroupPlusIcon */).GroupPlusIcon}
iconVariant="default"
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LR+Ptf'])}
/>
);
} else {
r12 = null;
}
items2 = [r12];
items2[1] = (
<ChatBeginningRowButton
style={[styles.gdmShareInviteLink, value5 ? null : styles.gdmShareInviteLinkNoRelationships]}
onPress={value10}
IconComponent={(require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon}
title={intl.string(t['3XVNyt'])}
subtitle={intl.string(t.qa9CQu)}
trailing={property
? (
<ActivityIndicator />
)
: null}
/>
);
if (channel.hasFlag(ChannelFlags.IS_JOIN_REQUEST_INTERVIEW_CHANNEL)) {
value = importDefault(11949) /* metro dependency 11949: ChatBeginningRowJoinApplication */;
value = ((Component) => <Component channelId={channel.id} />)(value);
r10 = value;
} else {
r10 = null;
}
items2[2] = r10;
value = (
<>
{items2}
</>
);
r5 = value;
}
items3[3] = r5;
return (
<View style={styles.centerHeader}>
{items3}
</View>
);
function _fun91505() { // fn#91505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:17717, offset: 0x02068123, size: 25 bytes, params: 1, frame: 9
const value = environment.__proto__;
return RelationshipStore.getRelationshipCount() > 0;
}
function* _fun91508() { // fn#91508, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:17855, offset: 0x02068184, size: 177 bytes, params: 1, frame: 20
var value7;
if (true) {
value = environment.__proto__;
if (!importDefault) {
dependencyMap(true);
var value4 = env2_1(env2_2[103]);
var mobileCreateInvite = value4.mobileCreateInvite;
var GROUP_DM = env2_32.GROUP_DM;
yield Reflect.apply(mobileCreateInvite, value4, [require, GROUP_DM]);
var value5 = undefined;
if (false) {
return value5;
}
if (value5 != null) {
value7 = env2_0(env2_2[63]);
value7.handleCopy(value5, require, env2_32.GROUP_DM, false);
}
dependencyMap(false);
}
}
}
function _fun91509() { // fn#91509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:18019, offset: 0x02068235, size: 117 bytes, params: 1, frame: 15
const value = environment.__proto__;
const UNSAFE_isDismissibleContentDismissed = DismissibleContentUnsafeUtilsModule.UNSAFE_isDismissibleContentDismissed;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const GDM_INVITE_REMINDER = DismissibleContent.GDM_INVITE_REMINDER;
if (Reflect.apply(UNSAFE_isDismissibleContentDismissed, DismissibleContentUnsafeUtilsModule,
[GDM_INVITE_REMINDER])) {
Module00057();
} else {
(importDefault(11388) /* metro dependency 11388: showChatGDMUpsellActionSheet */)({onClick: Module00057});
}
}
function _fun91510() { // fn#91510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:18172, offset: 0x020682aa, size: 117 bytes, params: 1, frame: 15
const value = environment.__proto__;
const UNSAFE_isDismissibleContentDismissed = DismissibleContentUnsafeUtilsModule.UNSAFE_isDismissibleContentDismissed;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const GDM_INVITE_REMINDER = DismissibleContent.GDM_INVITE_REMINDER;
if (Reflect.apply(UNSAFE_isDismissibleContentDismissed, DismissibleContentUnsafeUtilsModule,
[GDM_INVITE_REMINDER])) {
Module00005();
} else {
(importDefault(11388) /* metro dependency 11388: showChatGDMUpsellActionSheet */)({onClick: Module00005});
}
}
}
function ChatBeginningRowGuildDefaultChannel({guild, channel}) { // fn#91511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:7616, offset: 0x0206831f, size: 1290 bytes, params: 2, frame: 32
var r11;
var r12;
var ProgressItem;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var ProgressItem2;
const env0_2 = guild.id;
const styles = useStyles();
const {guildPopulated,
guildPersonalized} = (GuildProgressHooksModule).useCompletedStates(guild);
const {canInvite,
canManageGuild} = (GuildProgressHooksModule).usePermissions(channel,
guild);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
(Module00044)(currentUser != null,
'ChatBeginningRowGuildDefaultChannel: currentUser cannot be undefined');
const isGuildOwner2 = isGuildOwner(guild, currentUser);
const defaultImport2 = SnowflakeUtils;
const value6 = defaultImport2.extractTimestamp(guild.id);
const Date = global.Date;
const value8 = value6 < Date.now() - WELCOME_OLD_GUILD_AGE_THRESHOLD;
const isPrivateGuildChannel2 = (ChannelPermissionsUtilsModule).isPrivateGuildChannel(channel);
const value9 = (GuildProgressUtilsModule).useIsEligibleForGuildProgress(guild);
ReactModule.useLayoutEffect(_fun91519,
[(require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildSettingsStore], function() {
return GuildSettingsStore.getErrors();
}).message]);
if (canManageGuild) {
ProgressItem = importDefault(11936) /* metro dependency 11936: ProgressItem */;
r11 = (
<ProgressItem
onPress={function() {
return _addServerIcon.apply(this, arguments);
}}
source={{uri: importDefault(5586) /* metro dependency 5586: BrushIllocon2xPng */}}
iconStyle={styles.formCtaIcon}
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Yhi9/N'])}
isCompleted={guildPersonalized}
analyticsSetupType={AnalyticsSetupTypes.CHANNEL_WELCOME}
analyticsAction={AnalyticsActions.PERSONALIZE_SERVER}
/>
);
} else {
r11 = undefined;
}
if (canInvite) {
ProgressItem2 = importDefault(11936) /* metro dependency 11936: ProgressItem */;
r12 = (
<ProgressItem2
onPress={onPress_91516}
source={{uri: importDefault(5930) /* metro dependency 5930: MailboxIllocon2xPng */}}
iconStyle={styles.formCtaIcon}
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q9n0Ta)}
isCompleted={guildPopulated}
analyticsSetupType={AnalyticsSetupTypes.CHANNEL_WELCOME}
analyticsAction={AnalyticsActions.INVITE}
/>
);
} else {
r12 = undefined;
}
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r8 = value8 ? Reflect.apply(string, intl, [t['gwyU/J']]) : isGuildOwner2 ? Reflect.apply(string, intl,
[t['1ach9C']]) : Reflect.apply(string, intl, [t['ezm+/j']]);
const r14 = !value9 && (r12 != null || r11 != null);
const defaultImport5 = HelpdeskUtils;
const getArticleURL = defaultImport5.getArticleURL;
const GUILD_GETTING_STARTED = HelpdeskArticles.GUILD_GETTING_STARTED;
const value20 = '' + Reflect.apply(getArticleURL, defaultImport5,
[GUILD_GETTING_STARTED]) + '?utm_source=discord&utm_medium=blog&utm_campaign=2020-06_help-new-user&utm_content=--t%3Apm';
const fragment = (
<>
{r8}
{
r14
? (
<>
{' '}
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.UOtD32,
{guideURL: value20})}
</>
)
: null
}
</>
);
const Fragment = ReactModule.Fragment;
return (
<Fragment>
<ChatBeginningRowHeader
title={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['j59F/c'],
{guildName: guild.name})}
subtitle={fragment}
isPrivate={isPrivateGuildChannel2}
subtitleLink={r14 ? value20 : undefined}
/>
{
value9
? ((Component) => <Component guild={guild} />)(importDefault(11937) /* metro dependency 11937: GuildProgressItem */)
: (
<>
{r12}
{r11}
</>
)
}
</Fragment>
);
function _addServerIcon() { // fn#91513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:8315, owner: ChatBeginningRowGuildDefaultChannel._addServerIcon, offset: 0x02068829, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_4(_fun91515).apply(this, arguments);
function* _fun91515() { // fn#91515, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:8366, offset: 0x02068869, size: 185 bytes, params: 1, frame: 21
var binding3;
var value9;
if (true) {
value = environment.__proto__.__proto__.__proto__;
var binding = env3_1;
var binding2 = env3_2;
binding(binding2[59]).init(dependencyMap);
var value5 = binding(binding2[60]);
yield value5.openImagePicker({size: env3_35});
var value6 = undefined;
if (false) {
return value6;
}
var base64 = value6.base64;
if (base64 != null) {
binding = env3_1;
binding3 = env3_2;
binding(binding3[59]).updateIcon(dependencyMap, base64);
value9 = binding(binding3[59]);
value9.open(dependencyMap, env3_30.LANDING);
}
}
}
}
function ChatBeginningRowGuildDefaultChannelOnPress_91516() { // fn#91516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:8767, owner: ChatBeginningRowGuildDefaultChannel.onPress, offset: 0x02068922, size: 138 bytes, params: 1, frame: 16
var value2;
var moduleValue;
var value3;
var moduleValue2;
if (guild.vanityURLCode != null) {
value3 = environment.__proto__;
moduleValue2 = require(9151) /* metro dependency 9151: InstantInviteUtils */;
moduleValue2.showVanityUrlInviteActionSheet(guild, channel, InstantInviteSources.WELCOME_MESSAGE);
} else {
value2 = environment.__proto__;
moduleValue = require(9151) /* metro dependency 9151: InstantInviteUtils */;
moduleValue.showInstantInviteActionSheet(channel, {source: InstantInviteSources.WELCOME_MESSAGE});
}
}
function _fun91519() { // fn#91519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:8173, offset: 0x020689d1, size: 67 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (Module00057.message != null) {
value2 = environment.__proto__;
moduleValue = require(3856) /* metro dependency 3856: ToastUtils */;
moduleValue.presentError(Module00057.message);
}
}
}
function ChatBeginningRow({channelId, guildId, shouldRender, showingSpamBanner}) { // fn#91520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12112:19405, offset: 0x02068a14, size: 358 bytes, params: 2, frame: 22
const styles = useStyles();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
return ((Component) => <Component style={styles.container}>{shouldRender && channel != null ? THREAD_CHANNEL_TYPES.has(channel.type) ? <ChatBeginningRowThread channel={channel} /> : channel.isDM() ? <ChatBeginningRowDM channel={channel} showingSpamBanner={showingSpamBanner} /> : channel.isGroupDM() ? <ChatBeginningRowGroupDM channel={channel} /> : guild != null ? <ChatBeginningRowGuild guild={guild} channel={channel} /> : null : null}</Component>)(importDefault(11953) /* metro dependency 11953: PortalAccessibilityWorkaroundView */);
}
}
global.__d(_fun91451, 11926, [57, 5, 31, 27, 4502, 1378, 6865, 9113, 5189, 1383, 1422, 5109, 1379, 1935, 1945, 1867,
3784, 3793, 4864, 1878, 661, 1386, 11927, 11899, 8781, 33, 4501, 697, 6682, 1244, 6684, 6689, 6691, 4559, 4573,
3853, 3860, 5278, 11392, 1305, 11928, 8148, 9646, 566, 3995, 8206, 4020, 4805, 9088, 6863, 11089, 4048, 6622,
11929, 11930, 44, 21, 11932, 3856, 9112, 4660, 11936, 5586, 9151, 5930, 1948, 11937, 11940, 8153, 4603, 4578,
11944, 4497, 11945, 6779, 8092, 683, 10630, 8194, 6613, 6610, 3857, 4080, 11947, 1962, 6771, 11948, 8491, 8743,
6797, 8822, 8515, 6947, 5080, 8863, 6819, 8783, 8800, 8796, 8794, 10348, 7975, 4007, 8879, 3968, 1365, 11388,
5225, 9719, 10859, 4056, 11949, 11953,
2]) /* metro module 11926, dependencies: [57, 5, 31, 27, 4502, 1378, 6865, 9113, 5189, 1383, 1422, 5109, 1379, 1935, 1945, 1867, 3784, 3793, 4864, 1878, 661, 1386, 11927, 11899, 8781, 33, 4501, 697, 6682, 1244, 6684, 6689, 6691, 4559, 4573, 3853, 3860, 5278, 11392, 1305, 11928, 8148, 9646, 566, 3995, 8206, 4020, 4805, 9088, 6863, 11089, 4048, 6622, 11929, 11930, 44, 21, 11932, 3856, 9112, 4660, 11936, 5586, 9151, 5930, 1948, 11937, 11940, 8153, 4603, 4578, 11944, 4497, 11945, 6779, 8092, 683, 10630, 8194, 6613, 6610, 3857, 4080, 11947, 1962, 6771, 11948, 8491, 8743, 6797, 8822, 8515, 6947, 5080, 8863, 6819, 8783, 8800, 8796, 8794, 10348, 7975, 4007, 8879, 3968, 1365, 11388, 5225, 9719, 10859, 4056, 11949, 11953, 2] */;