/* Metro module 10248; source: modules/user_profile/native/UserProfileActivityVoiceChannel.tsx; dependencies: [27, 3784, 482, 33, 4501, 477, 6771, 8514, 4559, 10249, 4805, 566, 6707, 6711, 1244, 6819, 5278, 3857, 6818, 4573, 9122, 7709, 4080, 10250, 1962, 8743, 10251, 1305, 2] */ import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */ import ToastActionCreators from '../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */ import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */ import UseChannelName from '../../channel/useChannelName.tsx'; /* Metro dependency 4805 */ import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */ import GuildIcon from '../../guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */ import UsePersonalizedVoiceChannelUsers from '../hooks/usePersonalizedVoiceChannelUsers.tsx'; /* Metro dependency 10249 */ 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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */ import * as ConstantsModule from '../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */ import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */ import * as UseIsScreenReaderEnabledNativeModule from '../../a11y/native/useIsScreenReaderEnabled.native.tsx'; /* Metro dependency 4559 */ import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */ import * as ChevronSmallRightIconModule from '../../../design/components/Icon/native/redesign/generated/ChevronSmallRightIcon.tsx'; /* Metro dependency 6818 */ import * as GuildIconModule from '../../guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */ import * as PrivateChannelCallUtilsModule from '../../../utils/native/PrivateChannelCallUtils.tsx'; /* Metro dependency 7709 */ import * as UserProfileAnalyticsContextModule from '../UserProfileAnalyticsContext.tsx'; /* Metro dependency 8514 */ import * as AvatarPileNativeModule from '../../../design/components/Pile/native/AvatarPile.native.tsx'; /* Metro dependency 10251 */ function _fun79590(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:6, offset: 0x01e593d4, size: 316 bytes, params: 8, frame: 21 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = JsxRuntimeModule; const env0_6 = value.jsx; const env0_7 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; const object2 = {'flex': 1, 'overflow': 'hidden'}; object2.marginTop = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? -2 : -1; const env0_8 = Reflect.apply(createStyles, value, [{container: {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4, 'overflow': 'hidden'}, channelButton: {'flex': 1, 'flexDirection': 'row', 'alignItems': 'center', 'gap': 2}, channelName: object2}]); (FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/UserProfileActivityVoiceChannel.tsx'); exports.default = UserProfileActivityVoiceChannel; function UserProfileActivityVoiceChannel({guild, channel, onAction, style}) { // fn#79591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:524, offset: 0x01e59510, size: 1312 bytes, params: 2, frame: 33 var r6; const PressableOpacity = (PressablesModule).PressableOpacity; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const styles = useStyles(); const env0_3 = (UseAnalyticsLocations)().newestAnalyticsLocation; const useUserProfileAnalyticsContext = UserProfileAnalyticsContextModule.useUserProfileAnalyticsContext; const env0_4 = Reflect.apply(useUserProfileAnalyticsContext, UserProfileAnalyticsContextModule, []).context; const value2 = (UseIsScreenReaderEnabledNativeModule).useIsScreenReaderEnabled(); const value3 = (UsePersonalizedVoiceChannelUsers)(channel); const value4 = (UseChannelName)(channel); const value5 = (FluxModule).useStateFromStores([PermissionStore], _fun79592); const r12 = channel.isGuildStageVoice() ? (require(6707) /* metro dependency 6707: StageIcon */).StageIcon : (require(6711) /* metro dependency 6711: VoiceNormalIcon */).VoiceNormalIcon; const items3 = [styles.container, style]; const items2 = [ value2 ? ( {((Component) => )(importDefault(6819) /* metro dependency 6819: GuildIcon */)} ) : ( {((Component) => )(importDefault(6819) /* metro dependency 6819: GuildIcon */)} ), ]; const ChevronSmallRightIcon = (ChevronSmallRightIconModule).ChevronSmallRightIcon; items2[1] = ; if (value5) { r6 = ( {((Component) => )(r12)} {((Text) => {value4})((require(4573) /* metro dependency 4573: Text */).Text)} ); } else { r6 = ( {((Component) => )(r12)} {((Text) => {value4})((require(4573) /* metro dependency 4573: Text */).Text)} ); } items2[2] = r6; const formatToPlainString = intl.formatToPlainString; const e95u3C = (require(1244) /* metro dependency 1244: indexNative */).t.e95u3C; const object2 = {}; object2.count = value3.length; const AvatarPile = (AvatarPileNativeModule).AvatarPile; const AvatarSizes = (NativeModule).AvatarSizes; const SIZE_16 = AvatarSizes.SIZE_16; items2[3] = ( {(value3.length <= 3 ? value3 : value3.slice(0, 3)).map(_fun79599)} ); return ( {items2} ); function _fun79592() { // fn#79592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:801, offset: 0x01e59a30, size: 55 bytes, params: 1, frame: 14 return channel.isPrivate() || PermissionStore.can(Permissions.CONNECT, channel); } function UserProfileActivityVoiceChannelOnPress() { // fn#79593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:1225, owner: UserProfileActivityVoiceChannel.onPress, offset: 0x01e59a67, size: 100 bytes, params: 1, frame: 14 onAction({action: 'PRESS_VOICE_CHANNEL_ICON'}); (ToastActionCreators).open({key: 'GUILD_NAME_TOAST', content: guild.name, icon: icon_79594}); function onPressIcon_79594() { // fn#79594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:1327, owner: UserProfileActivityVoiceChannel.onPress.icon, offset: 0x01e59acb, size: 79 bytes, params: 1, frame: 16 const GuildIconSizes = (GuildIconModule).GuildIconSizes; const XSMALL = GuildIconSizes.XSMALL; return ; } } function UserProfileActivityVoiceChannelOnPress_79595() { // fn#79595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:1720, owner: UserProfileActivityVoiceChannel.onPress, offset: 0x01e59b1a, size: 97 bytes, params: 1, frame: 16 onAction({action: 'OPEN_VOICE_CHANNEL'}); PrivateChannelCallUtilsModule.openGuildVoiceModal(channel, newestAnalyticsLocation); (ActionSheetActionCreators).hideActionSheet(); } function UserProfileActivityVoiceChannelOnPress_79596() { // fn#79596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:2278, owner: UserProfileActivityVoiceChannel.onPress, offset: 0x01e59b7b, size: 144 bytes, params: 1, frame: 18 onAction({action: 'PRESS_VOICE_CHANNEL_AVATARS'}); const defaultImport = importDefault(dependencyMap[22]); defaultImport.openLazy(require(dependencyMap[24])(dependencyMap[23], dependencyMap.paths), 'UserProfileActivityVoiceChannelUsers', {users: ConstantsModule.Permissions, channel: channel, onPressUser: onPressUser}, 'stack'); function onPressUser(a0) { // fn#79597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:2437, owner: UserProfileActivityVoiceChannel.onPress.onPressUser, offset: 0x01e59c0b, size: 60 bytes, params: 2, frame: 14 let value = environment.__proto__.__proto__; value = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */; const object = {}; copyDataProperties(object, context, undefined); object['userId'] = a0; return value(object); } } function _fun79599(a0) { // fn#79599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10434:2639, offset: 0x01e59c52, size: 107 bytes, params: 2, frame: 18 const Avatar = (NativeModule).Avatar; const AvatarSizes = (NativeModule).AvatarSizes; const SIZE_16 = AvatarSizes.SIZE_16; return ( ); } } } global.__d(_fun79590, 10248, [27, 3784, 482, 33, 4501, 477, 6771, 8514, 4559, 10249, 4805, 566, 6707, 6711, 1244, 6819, 5278, 3857, 6818, 4573, 9122, 7709, 4080, 10250, 1962, 8743, 10251, 1305, 2]) /* metro module 10248, dependencies: [27, 3784, 482, 33, 4501, 477, 6771, 8514, 4559, 10249, 4805, 566, 6707, 6711, 1244, 6819, 5278, 3857, 6818, 4573, 9122, 7709, 4080, 10250, 1962, 8743, 10251, 1305, 2] */;