/* Metro module 15127; source: modules/guild/usePostableChannelCount.tsx; dependencies: [1935, 3784, 661, 566, 483, 2] */ import GuildChannelStore from '../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */ import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */ import * as GuildChannelStoreModule from '../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */ function _fun115321(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15324:6, offset: 0x0245c957, size: 178 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/guild/usePostableChannelCount.tsx'); exports.default = useSendMessageChannelCount; function useSendMessageChannelCount(a0) { // fn#115322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15324:263, offset: 0x0245ca09, size: 108 bytes, params: 2, frame: 16 const env0_0 = a0; const value = (FluxModule).useStateFromStores([GuildChannelStore], _fun115323, [a0]); let length = value.length; const value2 = 0; length = value2 === length ? value2 : value.filter(function({channel}) { var permissionStoreBinding = PermissionStore; var moduleValue = importAll(dependencyMap[4]); var SEND_MESSAGES = Permissions.SEND_MESSAGES; return permissionStoreBinding.can(moduleValue.combine(SEND_MESSAGES, Permissions.VIEW_CHANNEL), channel); }).length; return length; function _fun115323() { // fn#115323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15324:340, offset: 0x0245ca75, size: 45 bytes, params: 1, frame: 12 return GuildChannelStore.getChannels(env0_0)[GUILD_SELECTABLE_CHANNELS_KEY] ?? []; } } } global.__d(_fun115321, 15127, [1935, 3784, 661, 566, 483, 2]) /* metro module 15127, dependencies: [1935, 3784, 661, 566, 483, 2] */;