/* Metro module 12130; source: modules/channel/native/ChannelLongPressActionSheet.tsx; dependencies: [57, 5, 31, 5220, 9706, 5088, 1384, 4790, 1383, 5090, 1379, 5091, 1867, 3784, 3793, 1934, 4864, 1878, 661, 1376, 9696, 33, 8113, 1962, 7709, 4501, 697, 1305, 1244, 11717, 8743, 4054, 4603, 4805, 4647, 9646, 9879, 4056, 5080, 12131, 2970, 9390, 1230, 11234, 10859, 9151, 11245, 6609, 4008, 5312, 11761, 12148, 8129, 9748, 12149, 9738, 8999, 5097, 11923, 12151, 10629, 9216, 6613, 6610, 11241, 8148, 6684, 9695, 12152, 6707, 6682, 4080, 12153, 7712, 8114, 8665, 8153, 8998, 6593, 7002, 4060, 9087, 8772, 6797, 3856, 6771, 6789, 11248, 566, 1387, 5102, 12154, 1365, 7013, 9618, 3829, 6819, 12155, 11247, 6805, 1581, 11251, 6807, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import StageInstanceStore from '../../stage_channels/StageInstanceStore.tsx'; /* Metro dependency 1384 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import ChannelActionCreators from '../../../actions/ChannelActionCreators.tsx'; /* Metro dependency 4603 */
import AlertActionCreators from '../../../actions/AlertActionCreators.tsx'; /* Metro dependency 4647 */
import ActiveThreadsStore from '../../threads/ActiveThreadsStore.tsx'; /* Metro dependency 4790 */
import UseChannelName from '../useChannelName.tsx'; /* Metro dependency 4805 */
import UserGuildSettingsStore from '../../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
import ChannelSpoilerAgreeStore from '../../spoiler_channels/ChannelSpoilerAgreeStore.tsx'; /* Metro dependency 5088 */
import CategoryCollapseStore from '../../../stores/CategoryCollapseStore.tsx'; /* Metro dependency 5090 */
import CollapsedVoiceChannelStore from '../../../stores/CollapsedVoiceChannelStore.tsx'; /* Metro dependency 5091 */
import ReplyNudgeStore from '../../reply_nudge/ReplyNudgeStore.tsx'; /* Metro dependency 5220 */
import NotificationSettingsModalActionCreators from '../../../actions/NotificationSettingsModalActionCreators.tsx'; /* Metro dependency 6613 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import ChannelSettingsActionCreators from '../../../actions/ChannelSettingsActionCreators.tsx'; /* Metro dependency 8148 */
import CreateChannelModalActionCreators from '../../../actions/native/CreateChannelModalActionCreators.tsx'; /* Metro dependency 9087 */
import UseIsNsfwGated from '../../age_gate/useIsNsfwGated.tsx'; /* Metro dependency 9618 */
import ShowThreadBrowserModal from '../../threads/native/showThreadBrowserModal.tsx'; /* Metro dependency 9695 */
import ShowChatGDMCustomizeActionSheet from '../../group_dm/native/showChatGDMCustomizeActionSheet.tsx'; /* Metro dependency 9879 */
import BuildFavoritesSectionButtonsNative from '../../favorites/buildFavoritesSectionButtons.native.tsx'; /* Metro dependency 11234 */
import UseMobileChannelFavoriteActions from '../../favorites/useMobileChannelFavoriteActions.tsx'; /* Metro dependency 11247 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as ChannelRecordModule from '../../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
import * as StageChannelPermissionsModule from '../../stage_channels/StageChannelPermissions.tsx'; /* Metro dependency 1387 */
import * as MetaQuestUtilsAndroidModule from '../../device/MetaQuestUtils.android.tsx'; /* Metro dependency 1581 */
import * as UserSettingsModule from '../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as ToastUtilsModule from '../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as RootNavigationRefNativeModule from '../../main_tabs_v2/RootNavigationRef.native.tsx'; /* Metro dependency 4008 */
import * as UseChannelNameModule from '../useChannelName.tsx'; /* Metro dependency 4805 */
import * as OptInChannelsActionCreatorsModule from '../../opt_in_channels/OptInChannelsActionCreators.tsx'; /* Metro dependency 6609 */
import * as NotificationSettingsUtilsModule from '../../../utils/NotificationSettingsUtils.tsx'; /* Metro dependency 6610 */
import * as UseAnalyticsLocationsModule from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as ActionSheetNativeModule from '../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as ActionSheetRowNativeModule from '../../../design/components/Sheet/native/ActionSheetRow.native.tsx'; /* Metro dependency 6807 */
import * as ChannelDetailsConstantsModule from '../../main_tabs_v2/native/sidebar/details/ChannelDetailsConstants.tsx'; /* Metro dependency 9696 */
import * as ChannelSafetyWarningsStoreModule from '../../self_mod/ChannelSafetyWarningsStore.tsx'; /* Metro dependency 9706 */
import * as FavoritesHooksModule from '../../favorites/FavoritesHooks.tsx'; /* Metro dependency 11248 */
import * as ActionSheetIconHeaderNativeModule from '../../../design/components/Sheet/native/ActionSheetIconHeader.native.tsx'; /* Metro dependency 11251 */
import * as UseInappropriateConversationsTiersModule from '../../self_mod/inappropriate_conversation/hooks/useInappropriateConversationsTiers.tsx'; /* Metro dependency 12155 */
function _fun93068(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:6, offset: 0x020a5177, size: 708 bytes, params: 8, frame: 21
const env0_0 = require;
const handleVoiceOrStageChannelConnectPress = function() {
return _handleVoiceOrStageChannelConnectPress.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ChannelRecordModule;
const env0_11 = value.isGuildTextChannelType;
const env0_12 = value.isGuildVocalChannelType;
const env0_13 = value.isReadableType;
const env0_14 = value.isTextChannel;
value = require(661) /* metro dependency 661: Constants */;
const env0_24 = value.AnalyticsObjectTypes;
const env0_25 = value.AnalyticsObjects;
const env0_26 = value.AnalyticsSections;
const env0_27 = value.ChannelSettingsSections;
const env0_28 = value.ChannelTypes;
const env0_29 = value.InstantInviteSources;
const env0_30 = value.NULL_STRING_GUILD_ID;
const env0_31 = value.Permissions;
const env0_32 = value.ZERO_STRING_GUILD_ID;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BADGE_BACKGROUND_DEFAULT = (Native).colors.BADGE_BACKGROUND_DEFAULT;
const env0_36 = Reflect.apply(createStyles, value, [{tagContainer: {backgroundColor: BADGE_BACKGROUND_DEFAULT}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/channel/native/ChannelLongPressActionSheet.tsx');
exports.default = ChannelLongPressActionSheet;
function _handleVoiceOrStageChannelConnectPress() { // fn#93070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:820, offset: 0x020a543b, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun93072).apply(this, arguments);
function* _fun93072(a0) { // fn#93072, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:919, offset: 0x020a5478, size: 150 bytes, params: 2, frame: 17
if (true) {
value = a0.isGuildStageVoice();
var binding = env2_0;
var binding2 = env2_2;
var value4 = binding(binding2[23]);
if (value) {
yield value4(binding2[22], binding2.paths);
value = undefined;
if (false) {
return value;
}
value.connectAndOpen(a0);
} else {
yield value4(binding2[24], binding2.paths);
value = undefined;
if (false) {
return value;
}
value.openGuildVoiceModal(a0, 'Channel List');
}
}
}
}
function NewBadge_93073() { // fn#93073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:1211, offset: 0x020a550e, size: 74 bytes, params: 1, frame: 15
const styles = useStyles();
const NewTag = (NativeModule).NewTag;
return ;
}
function ChannelLongPressActionSheetConnected({channel, onClose}) { // fn#93074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:1317, offset: 0x020a5558, size: 1784 bytes, params: 2, frame: 53
var r12;
var intl;
const env0_3 = undefined;
const defaultImport = UseAnalyticsLocations;
const CHANNEL_LONG_PRESS_MENU = (AnalyticsLocation).CHANNEL_LONG_PRESS_MENU;
const analyticsLocations = defaultImport(CHANNEL_LONG_PRESS_MENU).analyticsLocations;
const guildId = channel.getGuildId();
const value4 = (FavoritesHooksModule).useIsFavoritesGuildSelected();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun93075);
const {canManageChannel, canCreateInstantInvite, canConnect,
canModerateStage} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PermissionStore],
_fun93076);
const value6 = (require(5102) /* metro dependency 5102: isOptInEnabled */).useOptInEnabledForGuild(guildId ?? NULL_STRING_GUILD_ID);
const {isOptedIn, isParentOptedIn,
isPinned} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserGuildSettingsStore],
_fun93077);
const value8 = (require(12154) /* metro dependency 12154: ChannelPinningExperiment */).useCanPinChannelsInGuild(guildId ?? NULL_STRING_GUILD_ID);
const canPin = value8.canPin;
const value10 = env0_3((require(7013) /* metro dependency 7013: useSelectedDismissibleContent */).useSelectedDismissibleContent(isPinned ? [] : value8.pinningNewlyAvailable ? channel.isThread() || channel.isCategory() || (guildId == null || value4) ? [] : [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.PIN_CHANNEL_NEW_BADGE] : []),
2);
const property = value10[0];
const property2 = value10[1];
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const PIN_CHANNEL_NEW_BADGE = DismissibleContent.PIN_CHANNEL_NEW_BADGE;
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
_fun93078);
const value12 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ActiveThreadsStore], _fun93079);
const value13 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CategoryCollapseStore],
function() {
return CategoryCollapseStore.isCollapsed(channel.parent_id);
});
const value14 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollapsedVoiceChannelStore],
function() {
return CollapsedVoiceChannelStore.isCollapsed(channel.id);
});
const value15 = (require(566) /* metro dependency 566: flux */).useStateFromStores([StageInstanceStore],
function() {
return StageInstanceStore.isLive(channel.id);
});
const value16 = (UseChannelName)(channel, true);
const value17 = (UseIsNsfwGated)(channel);
const DeveloperMode = (UserSettingsModule).DeveloperMode;
const value18 = DeveloperMode.useSetting();
const r14 = (
guild != null
? ((Component) => )(importDefault(6819) /* metro dependency 6819: GuildIcon */)
: ((Avatar) => )((require(1305) /* metro dependency 1305: native */).Avatar)
);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const r36 = currentUser != null && channel.isOwner(currentUser.id);
const value22 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
function() {
return UserGuildSettingsStore.isMessagesFavorite(channel.id);
});
const value23 = (UseInappropriateConversationsTiersModule).useInappropriateConversationsTiers(channel);
const r20 = value23?.isTier1 != null && !(value23 != null && value23.isTier1);
const r19 = value23?.isTier2 != null && !(value23 != null && value23.isTier2);
const value30 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ReplyNudgeStore], function() {
return ReplyNudgeStore.isChannelNudged(channel.id);
});
const value31 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelSpoilerAgreeStore],
function() {
return ChannelSpoilerAgreeStore.didAgree(channel.id);
});
const value32 = (UseMobileChannelFavoriteActions)(channel,
'ChannelLongPressActionSheet');
object = {channel: channel, canManageChannel: canManageChannel, canCreateInstantInvite: canCreateInstantInvite,
canConnect: canConnect, developerMode: value18, isMuted: value11, isOwner: r36, hasThreads: value12,
isNsfwGated: value17, isInCollapsedCategory: value13, isCollapsedVoiceChannel: value14,
isLiveStageChannel: value15, canModerateStage: canModerateStage, isOptInEnabled: value6, isOptedIn: isOptedIn,
isParentOptedIn: isParentOptedIn, isPinned: isPinned, canPin: canPin,
pinDCShowNewBadge: property === PIN_CHANNEL_NEW_BADGE, pinDCMarkAsDismissed: property2,
isMessagesFavorited: value22, canMarkAsTier1InappropriateConversation: r20,
canMarkAsTier2InappropriateConversation: r19, isReplyNudged: value30, isSpoilerAgreed: value31,
analyticsLocations: analyticsLocations, isFavoritesGuild: value4};
object.isStaff = currentUser?.isStaff() === true;
object.favorites = value32;
const actionSheetButtons = getActionSheetButtons(object);
if (channel.isGroupDM()) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r12 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ABMKx3,
{members: channel.recipients.length + 1});
} else {
r12 = undefined;
}
ReactModule.useEffect(_fun93123, [actionSheetButtons.length, value18, onClose]);
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
const actionSheetProps = {showGradient: true,
startExpanded: (MetaQuestUtilsAndroidModule).isMetaQuest()};
const ActionSheetIconHeader = (ActionSheetIconHeaderNativeModule).ActionSheetIconHeader;
actionSheetProps.header = (
);
return (
{actionSheetButtons.map(_fun93124)}
);
function _fun93075() { // fn#93075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:1549, offset: 0x020a5c50, size: 27 bytes, params: 1, frame: 11
return GuildStore.getGuild(env0_2);
}
function _fun93076() { // fn#93076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:1610, offset: 0x020a5c6b, size: 156 bytes, params: 1, frame: 16
const object = {};
let permissionStoreBinding = PermissionStore;
let can = permissionStoreBinding.can;
const MANAGE_CHANNELS = Permissions.MANAGE_CHANNELS;
const channelBinding = channel;
object.canManageChannel = Reflect.apply(can, permissionStoreBinding, [MANAGE_CHANNELS, channelBinding]);
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
const CREATE_INSTANT_INVITE = Permissions.CREATE_INSTANT_INVITE;
object.canCreateInstantInvite = Reflect.apply(can, permissionStoreBinding, [CREATE_INSTANT_INVITE, channelBinding]);
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
const CONNECT = Permissions.CONNECT;
object.canConnect = Reflect.apply(can, permissionStoreBinding, [CONNECT, channelBinding]);
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
const MODERATE_STAGE_CHANNEL_PERMISSIONS = (StageChannelPermissionsModule).MODERATE_STAGE_CHANNEL_PERMISSIONS;
object.canModerateStage = Reflect.apply(can, permissionStoreBinding, [MODERATE_STAGE_CHANNEL_PERMISSIONS,
channelBinding]);
return object;
}
function _fun93077() { // fn#93077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:1993, offset: 0x020a5d07, size: 142 bytes, params: 1, frame: 18
const object = {};
let userGuildSettingsStoreBinding = UserGuildSettingsStore;
const isChannelOptedIn = userGuildSettingsStoreBinding.isChannelOptedIn;
const binding = env0_2;
const channelBinding = channel;
object.isOptedIn = Reflect.apply(isChannelOptedIn, userGuildSettingsStoreBinding, [binding, channelBinding.id]);
object.isParentOptedIn = channelBinding.parent_id != null && UserGuildSettingsStore.isChannelOptedIn(env0_2,
channel.parent_id);
userGuildSettingsStoreBinding = UserGuildSettingsStore;
object.isPinned = userGuildSettingsStoreBinding.isFavorite(env0_2 ?? ZERO_STRING_GUILD_ID, channel.id);
return object;
}
function _fun93078() { // fn#93078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:2566, offset: 0x020a5d95, size: 37 bytes, params: 1, frame: 13
const userGuildSettingsStoreBinding = UserGuildSettingsStore;
return userGuildSettingsStoreBinding.isChannelMuted(env0_2, channel.id);
}
function _fun93079() { // fn#93079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:2633, offset: 0x020a5dba, size: 50 bytes, params: 1, frame: 14
return env0_2 != null && ActiveThreadsStore.hasThreadsForChannel(env0_2, channel.id);
}
function getActionSheetButtons({channel, canManageChannel, canCreateInstantInvite, canConnect, developerMode, isMuted, isOwner, hasThreads, isNsfwGated, isInCollapsedCategory, isCollapsedVoiceChannel, isLiveStageChannel, canModerateStage, isOptInEnabled, isOptedIn, isParentOptedIn, isPinned, canPin, pinDCShowNewBadge, pinDCMarkAsDismissed, isMessagesFavorited, canMarkAsTier1InappropriateConversation, canMarkAsTier2InappropriateConversation, isReplyNudged, isSpoilerAgreed, analyticsLocations, isFavoritesGuild, isStaff, favorites}) { // fn#93087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:3582, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons, offset: 0x020a5ebf, size: 5669 bytes, params: 2, frame: 52
var environment;
var r30;
var r22;
var r12;
var r6;
var buttons;
var push;
var object;
var value2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object2;
var object3;
var value3;
var object4;
var value4;
var object5;
var object6;
var value7;
var object7;
var object8;
var object10;
var object12;
var object13;
var object14;
var object15;
var object16;
var object17;
var object18;
var object19;
var object20;
var object21;
var object22;
var object23;
var object24;
var object25;
var isGuildStageVoice3;
var object26;
var object27;
var object28;
var object29;
var object30;
var object31;
var object32;
var isCategory5;
var object33;
var isCategory7;
var object34;
const items2 = [];
const object35 = {sectionKey: 'dm', buttons: []};
if (channel.isDM()) {
buttons = object35.buttons;
push = buttons.push;
object = {};
value2 = environment.__proto__;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.LYju5J);
object.IconComponent = (require(11717) /* metro dependency 11717: UserCircleIcon */).UserCircleIcon;
object.onPress = onPress_93088;
Reflect.apply(push, buttons, [object]);
if (!isFavoritesGuild) {
buttons = object35.buttons;
push = buttons.push;
object2 = {};
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jsvgc3);
object2.IconComponent = (require(4054) /* metro dependency 4054: UserMinusIcon */).UserMinusIcon;
object2.onPress = onPress_93089;
Reflect.apply(push, buttons, [object2]);
}
}
const object36 = {sectionKey: 'gdm', buttons: []};
const object37 = {sectionKey: 'gdm-destructive', buttons: []};
if (channel.isGroupDM()) {
if (!isFavoritesGuild) {
buttons = object37.buttons;
push = buttons.push;
object3 = {};
value3 = environment.__proto__;
object3.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['26C4oi']);
object3.IconComponent = (require(4054) /* metro dependency 4054: UserMinusIcon */).UserMinusIcon;
object3.isDestructive = true;
object3.onPress = onPress_93090;
Reflect.apply(push, buttons, [object3]);
}
buttons = object36.buttons;
push = buttons.push;
object4 = {};
value4 = environment.__proto__;
object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1r5E+m']);
object4.IconComponent = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
object4.onPress = onPress_93092;
Reflect.apply(push, buttons, [object4]);
if (isOwner) {
buttons = object36.buttons;
push = buttons.push;
object5 = {};
object5.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.OQ9MKu);
object5.IconComponent = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
object5.onPress = onPress_93093;
Reflect.apply(push, buttons, [object5]);
}
}
if (object35.buttons.length > 0) {
items2.push(object35);
}
if (isFavoritesGuild && channel.guild_id != null && !channel.isCategory()) {
push = items2.push;
object6 = {};
value7 = environment.__proto__;
object6.label = intl.string((importDefault(2970) /* metro dependency 2970: FavoritesGuildMessages */)['3KruG3']);
object6.IconComponent = (require(9390) /* metro dependency 9390: ServerIcon */).ServerIcon;
object6.onPress = onPress_93094;
Reflect.apply(push, items2, [{sectionKey: 'go-to-server', buttons: [object6]}]);
}
const value9 = (BuildFavoritesSectionButtonsNative)(favorites);
if (value9 != null) {
items2.push({sectionKey: 'favorites', buttons: [value9]});
}
const guildId = channel.getGuildId();
const object38 = {sectionKey: 'channel-actions', buttons: []};
if (canCreateInstantInvite && channel.type !== ChannelTypes.GUILD_CATEGORY) {
buttons = object38.buttons;
push = buttons.push;
object7 = {};
object7.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VINpSK);
object7.IconComponent = (require(10859) /* metro dependency 10859: GroupPlusIcon */).GroupPlusIcon;
object7.onPress = function() {
require(dependencyMap[45]).showInstantInviteActionSheet(channel,
{source: InstantInviteSources.CONTEXT_MENU});
};
Reflect.apply(push, buttons, [object7]);
}
let r26 = isFavoritesGuild || guildId == null;
r26 = !r26 ? channel.isThread() : r26;
if (!r26) {
if (!channel.isCategory() && (isPinned || canPin)) {
buttons = object38.buttons;
push = buttons.push;
object8 = {};
string = intl.string;
r30 = isPinned ? Reflect.apply(string, intl, [t.M5PWSf]) : Reflect.apply(string, intl, [t.RMpwZu]);
object8.label = r30;
object8.IconComponent = (require(11245) /* metro dependency 11245: PinIcon */).PinIcon;
r30 = (
pinDCShowNewBadge
? (
)
: undefined
);
object8.trailing = r30;
object8.onPress = onPress_93096;
Reflect.apply(push, buttons, [object8]);
}
if (isOptInEnabled) {
buttons = object38.buttons;
push = buttons.push;
object10 = {};
string = intl.string;
if (isParentOptedIn) {
object10.label = Reflect.apply(string, intl, [t.jNphKT]);
object10.IconComponent = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
object10.onPress = onPress_93097;
Reflect.apply(push, buttons, [object10]);
} else {
object10.label = isOptedIn ? Reflect.apply(string, intl, [t['3zySTA']]) : Reflect.apply(string, intl,
[t['9mysCh']]);
object10.IconComponent = isOptedIn ? (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon : (require(11761) /* metro dependency 11761: PlusLargeIcon */).PlusLargeIcon;
object10.onPress = onPress_93098;
Reflect.apply(push, buttons, [object10]);
}
}
}
let r25 = isGuildTextChannelType(channel.type) || isGuildVocalChannelType(channel.type);
r25 = !r25 ? channel.isForumLikeChannel() : r25;
if (r25) {
buttons = object38.buttons;
push = buttons.push;
object12 = {};
object12.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WqhZss);
object12.IconComponent = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
object12.isDestructive = false;
object12.onPress = onPress_93099;
Reflect.apply(push, buttons, [object12]);
}
if (!isFavoritesGuild && channel.isPrivate()) {
buttons = object38.buttons;
push = buttons.push;
object13 = {};
string = intl.string;
object13.label = isMessagesFavorited ? Reflect.apply(string, intl, [t.vDYmad]) : Reflect.apply(string, intl,
[t['uKw3A+']]);
object13.IconComponent = (require(11245) /* metro dependency 11245: PinIcon */).PinIcon;
object13.onPress = onPress_93100;
Reflect.apply(push, buttons, [object13]);
}
const object39 = {sectionKey: 'safety-warning-tooling', buttons: []};
if (canMarkAsTier1InappropriateConversation) {
buttons = object39.buttons;
push = buttons.push;
object14 = {};
object14.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.EuzCET);
object14.IconComponent = (require(8129) /* metro dependency 8129: WarningIcon */).WarningIcon;
object14.onPress = function() {
require(dependencyMap[53]).markAsInappropriateConversation(channel.id,
SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_1);
};
Reflect.apply(push, buttons, [object14]);
}
if (canMarkAsTier2InappropriateConversation) {
buttons = object39.buttons;
push = buttons.push;
object15 = {};
object15.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['tBw/1i']);
object15.IconComponent = (require(8129) /* metro dependency 8129: WarningIcon */).WarningIcon;
object15.onPress = function() {
require(dependencyMap[53]).markAsInappropriateConversation(channel.id,
SafetyWarningTypes.INAPPROPRIATE_CONVERSATION_TIER_2);
};
Reflect.apply(push, buttons, [object15]);
}
if (object39.buttons.length > 0) {
items2.push(object39);
}
if (isStaff) {
if (developerMode) {
if (channel.isDM()) {
object16 = {sectionKey: 'message-request', buttons: []};
if (channel.isMessageRequest !== true) {
buttons = object16.buttons;
push = buttons.push;
object17 = {};
object17.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.L6623r);
object17.IconComponent = (require(12149) /* metro dependency 12149: InboxIcon */).InboxIcon;
object17.onPress = onPress_93103;
Reflect.apply(push, buttons, [object17]);
}
buttons = object16.buttons;
push = buttons.push;
object18 = {};
object18.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['85YWlY']);
object18.IconComponent = (require(12149) /* metro dependency 12149: InboxIcon */).InboxIcon;
object18.onPress = onPress_93104;
Reflect.apply(push, buttons, [object18]);
buttons = object16.buttons;
if (buttons.length > 0) {
items2.push(object16);
}
}
}
}
if (object38.buttons.length > 0) {
items2.push(object38);
}
const object40 = {sectionKey: 'notifications', buttons: []};
let r7 = isReadableType(channel.type) || channel.isCategory();
r7 = !r7 ? channel.isForumLikeChannel() : r7;
if (r7) {
buttons = object40.buttons;
push = buttons.push;
object19 = {};
object19.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e6RscS);
object19.IconComponent = (require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon;
object19.onPress = function() {
require(dependencyMap[57]).ackChannel(channel, {section: AnalyticsSections.CHANNEL_ACTION_SHEET,
object: AnalyticsObjects.MARK_CHANNEL_AS_READ_BUTTON, objectType: AnalyticsObjectTypes.ACK_MANUAL});
};
Reflect.apply(push, buttons, [object19]);
}
if (channel.isPrivate() && isReplyNudged) {
buttons = object40.buttons;
push = buttons.push;
object20 = {};
object20.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q62UVy);
object20.IconComponent = (require(11923) /* metro dependency 11923: ChatXIcon */).ChatXIcon;
object20.onPress = onPress_93106;
Reflect.apply(push, buttons, [object20]);
}
if (isTextChannel(channel.type)) {
string = intl.string;
if (isMuted) {
r22 = channel.isCategory() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.olaBeG) : channel.isDM() || channel.isGroupDM() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['s5/5fm']) : channel.isThread() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Cq/TzF']) : Reflect.apply(string,
intl, [t.OYefme]);
buttons = object40.buttons;
push = buttons.push;
object22 = {label: r22};
object22.IconComponent = (require(9216) /* metro dependency 9216: BellIcon */).BellIcon;
object22.onPress = function() {
var defaultImport = importDefault(dependencyMap[62]);
var channelBinding = channel;
var value3 = channelBinding.getGuildId();
var id = channelBinding.id;
var object = {};
var value4 = !isMuted;
object.muted = value4;
var NotificationLabel = require(dependencyMap[63]).NotificationLabel;
defaultImport.updateChannelOverrideSettings(value3, id, object, NotificationLabel.muted(value4));
};
Reflect.apply(push, buttons, [object22]);
} else {
r26 = channel.isCategory() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pNMCg2) : channel.isDM() || channel.isGroupDM() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.LO3kaK) : channel.isThread() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bUUd8q) : Reflect.apply(string,
intl, [t.tbeRRJ]);
buttons = object40.buttons;
push = buttons.push;
object21 = {label: r26};
object21.IconComponent = (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon;
object21.onPress = onPress_93108;
Reflect.apply(push, buttons, [object21]);
}
} else if (channel.isCategory()) {
string = intl.string;
if (isMuted) {
r22 = channel.isCategory() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.olaBeG) : channel.isDM() || channel.isGroupDM() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['s5/5fm']) : channel.isThread() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Cq/TzF']) : Reflect.apply(string,
intl, [t.OYefme]);
buttons = object40.buttons;
push = buttons.push;
object22 = {label: r22};
object22.IconComponent = (require(9216) /* metro dependency 9216: BellIcon */).BellIcon;
object22.onPress = onPress_93107;
Reflect.apply(push, buttons, [object22]);
} else {
r26 = channel.isCategory() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pNMCg2) : channel.isDM() || channel.isGroupDM() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.LO3kaK) : channel.isThread() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bUUd8q) : Reflect.apply(string,
intl, [t.tbeRRJ]);
buttons = object40.buttons;
push = buttons.push;
object21 = {label: r26};
object21.IconComponent = (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon;
object21.onPress = onPress_93108;
Reflect.apply(push, buttons, [object21]);
}
} else if (channel.isForumLikeChannel()) {
string = intl.string;
if (isMuted) {
r22 = channel.isCategory() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.olaBeG) : channel.isDM() || channel.isGroupDM() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['s5/5fm']) : channel.isThread() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Cq/TzF']) : Reflect.apply(string,
intl, [t.OYefme]);
buttons = object40.buttons;
push = buttons.push;
object22 = {label: r22};
object22.IconComponent = (require(9216) /* metro dependency 9216: BellIcon */).BellIcon;
object22.onPress = onPress_93107;
Reflect.apply(push, buttons, [object22]);
} else {
r26 = channel.isCategory() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pNMCg2) : channel.isDM() || channel.isGroupDM() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.LO3kaK) : channel.isThread() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bUUd8q) : Reflect.apply(string,
intl, [t.tbeRRJ]);
buttons = object40.buttons;
push = buttons.push;
object21 = {label: r26};
object21.IconComponent = (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon;
object21.onPress = onPress_93108;
Reflect.apply(push, buttons, [object21]);
}
}
r7 = isGuildTextChannelType(channel.type) || channel.isCategory();
r7 = !r7 ? channel.isGuildStageVoice() : r7;
r7 = !r7 ? channel.isForumLikeChannel() : r7;
if (r7) {
buttons = object40.buttons;
push = buttons.push;
object23 = {};
object23.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h850Ss);
object23.IconComponent = (require(11241) /* metro dependency 11241: ChannelNotificationIcon */).ChannelNotificationIcon;
object23.disableColor = true;
object23.onPress = onPress_93109;
Reflect.apply(push, buttons, [object23]);
}
if (object40.buttons.length > 0) {
items2.push(object40);
}
const object41 = {sectionKey: 'threads', buttons: []};
r7 = channel.isThread() || channel.isForumLikeChannel();
r7 = !r7 ? !hasThreads : r7;
r7 = !r7 ? isNsfwGated : r7;
if (!r7) {
buttons = object41.buttons;
push = buttons.push;
object24 = {};
object24.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.B2panI);
object24.IconComponent = (require(6684) /* metro dependency 6684: ThreadIcon */).ThreadIcon;
object24.onPress = onPress_93110;
Reflect.apply(push, buttons, [object24]);
}
if (object41.buttons.length > 0) {
items2.push(object41);
}
const object42 = {sectionKey: 'voice', buttons: []};
if (isGuildVocalChannelType(channel.type) && !isInCollapsedCategory) {
buttons = object42.buttons;
push = buttons.push;
object25 = {};
string = intl.string;
object25.label = isCollapsedVoiceChannel ? Reflect.apply(string, intl, [t.JYF2Oa]) : Reflect.apply(string, intl,
[t.LxzNiu]);
object25.IconComponent = (require(11717) /* metro dependency 11717: UserCircleIcon */).UserCircleIcon;
object25.onPress = onPress_93111;
Reflect.apply(push, buttons, [object25]);
}
if (channel.isGuildVocal()) {
isGuildStageVoice3 = channel.isGuildStageVoice();
buttons = object42.buttons;
push = buttons.push;
object26 = {};
string = intl.string;
if (isGuildStageVoice3) {
object26.label = Reflect.apply(string, intl, [t['7vb2cc']]);
object26.IconComponent = (require(6707) /* metro dependency 6707: StageIcon */).StageIcon;
object26.onPress = function() {
handleVoiceOrStageChannelConnectPress(channel);
};
Reflect.apply(push, buttons, [object26]);
buttons = object42.buttons;
push = buttons.push;
object27 = {};
object27.label = intl.string(t.ZXxLQg);
object27.IconComponent = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon;
object27.onPress = onPress_93113;
Reflect.apply(push, buttons, [object27]);
} else {
object26.label = Reflect.apply(string, intl, [t.ZXxLQg]);
object26.IconComponent = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon;
object26.onPress = onPress_93114;
Reflect.apply(push, buttons, [object26]);
}
}
if (channel.isGuildStageVoice() && isLiveStageChannel && canModerateStage) {
buttons = object42.buttons;
push = buttons.push;
object28 = {};
object28.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.saZaRb);
object28.IconComponent = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
object28.isDestructive = true;
object28.onPress = onPress_93115;
Reflect.apply(push, buttons, [object28]);
}
if (channel.isGuildStageVoice() && isLiveStageChannel && canConnect) {
buttons = object42.buttons;
push = buttons.push;
object29 = {};
object29.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+78Pfm']);
object29.IconComponent = (require(8665) /* metro dependency 8665: FlagIcon */).FlagIcon;
object29.isDestructive = true;
object29.onPress = onPress_93118;
Reflect.apply(push, buttons, [object29]);
}
if (object42.buttons.length > 0) {
items2.push(object42);
}
if (channel.isSpoilerChannel()) {
if (isSpoilerAgreed) {
object30 = {sectionKey: 'spoiler', buttons: []};
buttons = object30.buttons;
push = buttons.push;
object31 = {};
object31.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ix2UVZ);
object31.IconComponent = (require(8998) /* metro dependency 8998: EyeSlashIcon */).EyeSlashIcon;
object31.onPress = onPress_93119;
Reflect.apply(push, buttons, [object31]);
items2.push(object30);
}
}
const object43 = {sectionKey: 'admin-actions', buttons: []};
if (canManageChannel) {
buttons = object43.buttons;
push = buttons.push;
object32 = {};
isCategory5 = channel.isCategory();
string = intl.string;
r12 = isCategory5 ? Reflect.apply(string, intl, [t.zdPFs9]) : Reflect.apply(string, intl, [t['3gUsJb']]);
object32.label = r12;
object32.IconComponent = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
object32.onPress = onPress_93120;
Reflect.apply(push, buttons, [object32]);
r6 = isGuildTextChannelType(channel.type) || channel.isForumLikeChannel();
r6 = !r6 ? channel.isGuildVoice() : r6;
r6 = !r6 ? channel.isCategory() : r6;
if (r6) {
buttons = object43.buttons;
push = buttons.push;
object33 = {};
isCategory7 = channel.isCategory();
string = intl.string;
r12 = isCategory7 ? Reflect.apply(string, intl, [t['fUYU+j']]) : Reflect.apply(string, intl, [t.dEaPc4]);
object33.label = r12;
r12 = channel.isCategory() ? (require(11761) /* metro dependency 11761: PlusLargeIcon */).PlusLargeIcon : (require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon;
object33.IconComponent = r12;
object33.onPress = onPress_93121;
Reflect.apply(push, buttons, [object33]);
}
}
if (developerMode) {
buttons = object43.buttons;
push = buttons.push;
object34 = {};
object34.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gFHI3k);
object34.IconComponent = (require(8772) /* metro dependency 8772: IdIcon */).IdIcon;
object34.onPress = onPress_93122;
Reflect.apply(push, buttons, [object34]);
}
if (object43.buttons.length > 0) {
items2.push(object43);
}
if (object36.buttons.length > 0) {
items2.push(object36);
}
if (object37.buttons.length > 0) {
items2.push(object37);
}
return items2;
function getActionSheetButtonsOnPress() { // fn#93088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:4302, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a74e4, size: 73 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
const object = {};
const channelBinding = channel;
object.userId = channelBinding.getRecipientId();
object.channelId = channelBinding.id;
object.sourceAnalyticsLocations = analyticsLocations;
value(object);
}
function getActionSheetButtonsOnPress_93089() { // fn#93089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:4498, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a752d, size: 74 bytes, params: 1, frame: 16
const value = environment.__proto__.__proto__;
const defaultImport = ChannelActionCreators;
const closePrivateChannel = defaultImport.closePrivateChannel;
const channelBinding = channel;
Reflect.apply(closePrivateChannel, defaultImport, [channelBinding.id,
SelectedChannelStore.getCurrentlySelectedChannelId() === channelBinding.id]);
}
function getActionSheetButtonsOnPress_93090() { // fn#93090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:4809, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7577, size: 443 bytes, params: 1, frame: 23
var r6;
var r7;
var value5;
const computeChannelName = UseChannelNameModule.computeChannelName;
const channelBinding = channel;
const channelName = Reflect.apply(computeChannelName, UseChannelNameModule, [channelBinding, UserStore,
RelationshipStore]);
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (IndexNativeModule).t;
const value3 = Reflect.apply(formatToPlainString, intl, [t.hJ5Ap4, {name: channelName}]);
const format = intl.format;
const SSIVOu = t.SSIVOu;
if (channelBinding.isManaged()) {
value5 = intl.formatToPlainString(t.hVGjEW, {name: channelName});
r6 = intl.format(t.IK1Qvs, {name: channelName});
r7 = value5;
} else {
r6 = Reflect.apply(format, intl, [SSIVOu, {name: channelName}]);
r7 = value3;
}
(AlertActionCreators).show({title: r7, body: r6,
confirmText: intl.string(t.p89ACt), cancelText: intl.string(t.gm1Vej), onConfirm: onConfirm_93091});
function onPressOnConfirm_93091() { // fn#93091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:5250, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress.onConfirm, offset: 0x020a7732, size: 74 bytes, params: 1, frame: 16
const value = environment.__proto__.__proto__.__proto__;
const defaultImport = ChannelActionCreators;
const closePrivateChannel = defaultImport.closePrivateChannel;
const channelBinding = channel;
Reflect.apply(closePrivateChannel, defaultImport, [channelBinding.id,
SelectedChannelStore.getCurrentlySelectedChannelId() === channelBinding.id]);
}
}
function getActionSheetButtonsOnPress_93092() { // fn#93092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:5437, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a777c, size: 50 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(ShowChatGDMCustomizeActionSheet)({channelId: channel.id});
}
function getActionSheetButtonsOnPress_93093() { // fn#93093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:5575, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a77ae, size: 91 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
const defaultImport = importDefault(dependencyMap[38]);
const pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[23]);
value = value(dependencyMap[39], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {channelId: channel.id}]);
}
function getActionSheetButtonsOnPress_93094() { // fn#93094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:5846, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7809, size: 56 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = require(1230) /* metro dependency 1230: router_utils */;
const transitionToGuild = value.transitionToGuild;
const channelBinding = channel;
Reflect.apply(transitionToGuild, value, [channelBinding.guild_id, channelBinding.id]);
}
function getActionSheetButtonsOnPress_93096() { // fn#93096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:6477, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a787f, size: 270 bytes, params: 1, frame: 22
var name;
var params;
var pinDCMarkAsDismissedBinding;
var value2;
var rootNavigationRef;
var currentRoute;
var currentRoute2;
if (pinDCShowNewBadge) {
pinDCMarkAsDismissedBinding = pinDCMarkAsDismissed;
value2 = environment.__proto__.__proto__;
pinDCMarkAsDismissedBinding(ContentDismissActionType.TAKE_ACTION);
}
const value4 = undefined;
const setIsFavorite = OptInChannelsActionCreatorsModule.setIsFavorite;
const binding = env0_8;
const id = channel.id;
const isPinnedBinding = isPinned;
const CHANNEL_ACTION_SHEET = AnalyticsSections.CHANNEL_ACTION_SHEET;
Reflect.apply(setIsFavorite, OptInChannelsActionCreatorsModule, [binding, id, !isPinnedBinding,
{section: CHANNEL_ACTION_SHEET}]);
if (!isPinnedBinding) {
rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
if (rootNavigationRef != null) {
currentRoute = rootNavigationRef.getCurrentRoute();
name = currentRoute == null ? value4 : currentRoute.name;
currentRoute2 = rootNavigationRef.getCurrentRoute();
params = currentRoute2 == null ? value4 : currentRoute2.params;
if (name === 'guilds' && (params == null ? value4 : params.guildId) === env0_8) {
rootNavigationRef.setParams({jumpToChannelId: channel.id});
}
}
}
return value4;
}
function getActionSheetButtonsOnPress_93097() { // fn#93097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:6925, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a798d, size: 97 bytes, params: 1, frame: 17
var value2;
var moduleValue;
if (channel.parent_id != null) {
value2 = environment.__proto__.__proto__;
moduleValue = require(6609) /* metro dependency 6609: OptInChannelsActionCreators */;
moduleValue.setOptInChannel(env0_8, channel.parent_id, false,
{section: AnalyticsSections.CHANNEL_ACTION_SHEET});
}
}
function getActionSheetButtonsOnPress_93098() { // fn#93098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:7204, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a79ee, size: 83 bytes, params: 1, frame: 19
const setOptInChannel = OptInChannelsActionCreatorsModule.setOptInChannel;
const binding = env0_8;
const id = channel.id;
const isOptedInBinding = isOptedIn;
const CHANNEL_ACTION_SHEET = AnalyticsSections.CHANNEL_ACTION_SHEET;
Reflect.apply(setOptInChannel, OptInChannelsActionCreatorsModule, [binding, id, !isOptedInBinding,
{section: CHANNEL_ACTION_SHEET}]);
}
function getActionSheetButtonsOnPress_93099() { // fn#93099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:7449, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7a41, size: 56 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = require(12148) /* metro dependency 12148: ChannelActionSheetUtils */;
const copyGuildChannelOrThreadLink = value.copyGuildChannelOrThreadLink;
const channelBinding = channel;
Reflect.apply(copyGuildChannelOrThreadLink, value, [channelBinding.guild_id, channelBinding.id]);
}
function getActionSheetButtonsOnPress_93100() { // fn#93100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:7675, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7a79, size: 58 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = require(6609) /* metro dependency 6609: OptInChannelsActionCreators */;
value.setMessagesFavorite(channel.id, !isMessagesFavorited);
}
function getActionSheetButtonsOnPress_93103() { // fn#93103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:8401, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7b2d, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(9738) /* metro dependency 9738: MessageRequestActionCreators */;
value.markAsMessageRequest(channel.id);
}
function getActionSheetButtonsOnPress_93104() { // fn#93104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:8549, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7b5f, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(9738) /* metro dependency 9738: MessageRequestActionCreators */;
value.clearMessageRequestState(channel.id);
}
function getActionSheetButtonsOnPress_93106() { // fn#93106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:9109, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7bee, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(12151) /* metro dependency 12151: ReplyNudgeActionCreators */;
value.clearReplyNudge(channel.id);
}
function getActionSheetButtonsOnPress_93107() { // fn#93107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:9504, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7c20, size: 118 bytes, params: 1, frame: 21
const defaultImport = NotificationSettingsModalActionCreators;
const updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
const channelBinding = channel;
const guildId = channelBinding.getGuildId();
const id = channelBinding.id;
const object = {};
const value4 = !isMuted;
object.muted = value4;
const NotificationLabel = (NotificationSettingsUtilsModule).NotificationLabel;
Reflect.apply(updateChannelOverrideSettings, defaultImport, [guildId, id, object, NotificationLabel.muted(value4)]);
}
function getActionSheetButtonsOnPress_93108() { // fn#93108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:9924, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7c96, size: 120 bytes, params: 1, frame: 15
const rootNavigationRef = (RootNavigationRefNativeModule).getRootNavigationRef();
if (rootNavigationRef != null && rootNavigationRef.isReady()) {
rootNavigationRef.navigate('sidebar', {channelId: channel.id,
initialRouteName: ChannelDetailsNavigatorScreens.MUTE,
source: 'channel-long-press-sheet'});
}
}
function getActionSheetButtonsOnPress_93109() { // fn#93109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:10296, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7d0e, size: 80 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
const defaultImport = ChannelSettingsActionCreators;
const setSection = defaultImport.setSection;
const NOTIFICATIONS = ChannelSettingsSections.NOTIFICATIONS;
Reflect.apply(setSection, defaultImport, [NOTIFICATIONS]);
value = defaultImport;
value.open(channel.id);
}
function getActionSheetButtonsOnPress_93110() { // fn#93110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:10582, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7d5e, size: 39 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(ShowThreadBrowserModal)(channel);
}
function getActionSheetButtonsOnPress_93111() { // fn#93111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:10840, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7d85, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = importDefault(12152) /* metro dependency 12152: ChannelCollapseActionCreators */;
value.update(channel.id);
}
function getActionSheetButtonsOnPress_93113() { // fn#93113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:11165, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7dce, size: 108 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
importDefault(dependencyMap[71]).hideActionSheet();
const defaultImport2 = importDefault(dependencyMap[38]);
const pushLazy = defaultImport2.pushLazy;
value = require(dependencyMap[23]);
value = value(dependencyMap[72], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport2, [value, {channel: channel}]);
}
function getActionSheetButtonsOnPress_93114() { // fn#93114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:11356, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7e3a, size: 62 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
const handleVoiceOrStageChannelConnectPressBinding = handleVoiceOrStageChannelConnectPress;
const channelBinding = channel;
handleVoiceOrStageChannelConnectPressBinding(channelBinding);
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.updateChatOpen(channelBinding.id, true);
}
function getActionSheetButtonsOnPress_93115() { // fn#93115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:11595, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7e78, size: 29 bytes, params: 1, frame: 11
return env2_4(_fun93117)();
function* _fun93117() { // fn#93117, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:11602, offset: 0x020a7ea0, size: 87 bytes, params: 1, frame: 14
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var binding = env4_0;
var binding2 = env4_2;
yield binding(binding2[23])(binding2[74], binding2.paths);
value = undefined;
if (false) {
return value;
}
var openEndStageModal = value.openEndStageModal;
value = environment.__proto__.__proto__;
openEndStageModal(channel);
}
}
}
function getActionSheetButtonsOnPress_93118() { // fn#93118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:11822, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7ef7, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(8153) /* metro dependency 8153: ReportModals */;
value.showReportModalForStageChannel(channel);
}
function getActionSheetButtonsOnPress_93119() { // fn#93119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:12076, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7f24, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.clearSpoilerAgree(channel.id);
}
function getActionSheetButtonsOnPress_93120() { // fn#93120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:12349, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7f56, size: 80 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
const defaultImport = ChannelSettingsActionCreators;
const setSection = defaultImport.setSection;
const OVERVIEW = ChannelSettingsSections.OVERVIEW;
Reflect.apply(setSection, defaultImport, [OVERVIEW]);
value = defaultImport;
value.open(channel.id);
}
function getActionSheetButtonsOnPress_93121() { // fn#93121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:12676, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a7fa6, size: 155 bytes, params: 1, frame: 20
let value = environment.__proto__.__proto__;
value = undefined;
const defaultImport = CreateChannelModalActionCreators;
const open = defaultImport.open;
let channelBinding = channel;
const type = channelBinding.isCategory() ? value : channel.type;
channelBinding = channel;
const guildId = channelBinding.getGuildId();
const isCategory2 = channelBinding.isCategory();
channelBinding = channel;
const r2 = isCategory2 ? channelBinding.id : channelBinding.parent_id;
channelBinding = channel;
Reflect.apply(open, defaultImport, [type, guildId, r2, channelBinding.isCategory() ? value : channel.id]);
return value;
}
function getActionSheetButtonsOnPress_93122() { // fn#93122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:12904, owner: ChannelLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x020a8041, size: 72 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(channel.id);
(ToastUtilsModule).presentIdCopied();
}
}
function _fun93123() { // fn#93123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:13784, offset: 0x020a8089, size: 42 bytes, params: 1, frame: 10
if (!(Module00005.length !== 0 || env0_3)) {
onClose();
}
}
function _fun93124(a0) { // fn#93124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:14054, offset: 0x020a80b3, size: 97 bytes, params: 2, frame: 18
const ActionSheetRow = (ActionSheetRowNativeModule).ActionSheetRow;
const Group = ActionSheetRow.Group;
return (
{a0.buttons.map(_fun93125)}
);
function _fun93125({label, IconComponent, iconStyle, trailing, isDestructive, onPress, disableColor}, a1) { // fn#93125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:14127, offset: 0x020a8114, size: 181 bytes, params: 3, frame: 25
var environment;
const r14 = isDestructive ? 'danger' : 'default';
value = environment.__proto__.__proto__;
const ActionSheetRow = (ActionSheetRowNativeModule).ActionSheetRow;
const ActionSheetRow2 = (ActionSheetRowNativeModule).ActionSheetRow;
const Icon = ActionSheetRow2.Icon;
return (
}
trailing={trailing}
onPress={function() {
if (onPress != null) {
onPress();
}
onClose();
}}
key={a1}
/>
);
}
}
}
function ChannelLongPressActionSheet({channelId, onClose}) { // fn#93127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12316:14552, offset: 0x020a81ef, size: 153 bytes, params: 2, frame: 18
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
ReactModule.useEffect(function() {
if (channel == null) {
onClose();
}
}, [channel, onClose]);
return (
channel != null
? (
)
: null
);
}
}
global.__d(_fun93068, 12130, [57, 5, 31, 5220, 9706, 5088, 1384, 4790, 1383, 5090, 1379, 5091, 1867, 3784, 3793,
1934, 4864, 1878, 661, 1376, 9696, 33, 8113, 1962, 7709, 4501, 697, 1305, 1244, 11717, 8743, 4054, 4603, 4805,
4647, 9646, 9879, 4056, 5080, 12131, 2970, 9390, 1230, 11234, 10859, 9151, 11245, 6609, 4008, 5312, 11761,
12148, 8129, 9748, 12149, 9738, 8999, 5097, 11923, 12151, 10629, 9216, 6613, 6610, 11241, 8148, 6684, 9695,
12152, 6707, 6682, 4080, 12153, 7712, 8114, 8665, 8153, 8998, 6593, 7002, 4060, 9087, 8772, 6797, 3856, 6771,
6789, 11248, 566, 1387, 5102, 12154, 1365, 7013, 9618, 3829, 6819, 12155, 11247, 6805, 1581, 11251, 6807,
2]) /* metro module 12130, dependencies: [57, 5, 31, 5220, 9706, 5088, 1384, 4790, 1383, 5090, 1379, 5091, 1867, 3784, 3793, 1934, 4864, 1878, 661, 1376, 9696, 33, 8113, 1962, 7709, 4501, 697, 1305, 1244, 11717, 8743, 4054, 4603, 4805, 4647, 9646, 9879, 4056, 5080, 12131, 2970, 9390, 1230, 11234, 10859, 9151, 11245, 6609, 4008, 5312, 11761, 12148, 8129, 9748, 12149, 9738, 8999, 5097, 11923, 12151, 10629, 9216, 6613, 6610, 11241, 8148, 6684, 9695, 12152, 6707, 6682, 4080, 12153, 7712, 8114, 8665, 8153, 8998, 6593, 7002, 4060, 9087, 8772, 6797, 3856, 6771, 6789, 11248, 566, 1387, 5102, 12154, 1365, 7013, 9618, 3829, 6819, 12155, 11247, 6805, 1581, 11251, 6807, 2] */;