/* Metro module 9647; source: modules/directory_channels/useAvailableAndAddedGuilds.tsx; dependencies: [5, 57, 31, 1867, 3784, 4896, 9640, 661, 566, 4594, 9644, 2] */ import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */ import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */ import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */ import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */ import UseMountEffect from '../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */ import SortedGuildStore from '../../stores/SortedGuildStore.tsx'; /* Metro dependency 4896 */ import GuildDirectoryStore from './GuildDirectoryStore.tsx'; /* Metro dependency 9640 */ 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 ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */ function _fun75697(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9833:6, offset: 0x01db5f40, size: 243 bytes, params: 8, frame: 20 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/directory_channels/useAvailableAndAddedGuilds.tsx'); exports.default = _default_75698; function _default_75698(a0, a1) { // fn#75698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9833:197, offset: 0x01db6033, size: 297 bytes, params: 3, frame: 23 const env0_0 = a0; const env0_1 = a1; const [property, env0_2] = Module00057(ReactModule.useState(false), 2); const adminGuildEntryIds = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildDirectoryStore], function() { return GuildDirectoryStore.getAdminGuildEntryIds(require); }); const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([SortedGuildStore, GuildStore, PermissionStore], _fun75700, [a0]); (UseMountEffect)(_fun75702); object = {}; object.availableGuilds = ReactModule.useMemo(_fun75706, [value4, adminGuildEntryIds]); object.addedGuilds = ReactModule.useMemo(_fun75708, [value4, adminGuildEntryIds]); object.loading = property; return object; function _fun75700() { // fn#75700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9833:359, offset: 0x01db6179, size: 46 bytes, params: 1, frame: 12 var environment; const value = environment.__proto__; SortedGuildStore.getFlattenedGuildIds().forEach(_fun75701); return []; function _fun75701(a0) { // fn#75701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9833:418, offset: 0x01db61a7, size: 99 bytes, params: 2, frame: 14 var id; let value = environment.__proto__.__proto__; const guild = GuildStore.getGuild(a0); let r0 = guild != null && PermissionStore.can(Permissions.ADMINISTRATOR, guild); if (r0) { id = guild.id; value = environment.__proto__; value = id !== env1_0; r0 = value; } if (r0) { env0_0.push(guild); } } } function _fun75702() { // fn#75702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9833:525, offset: 0x01db620a, size: 29 bytes, params: 1, frame: 11 env1_4(_fun75704)(); function* _fun75704() { // fn#75704, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9833:533, offset: 0x01db6232, size: 115 bytes, params: 1, frame: 18 var environment; if (true) { value = environment.__proto__.__proto__; importAll(true); var binding = env3_2; var value4 = binding(env3_3[10]); var fetchGuildEntriesForIds = value4.fetchGuildEntriesForIds; binding = env2_4; yield Reflect.apply(fetchGuildEntriesForIds, value4, [importDefault, binding.map(function(a0) { return a0.id; })]); if (false) { return undefined; } importAll(false); } } } function _fun75706() { // fn#75706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9833:652, offset: 0x01db62a5, size: 28 bytes, params: 1, frame: 11 return Module00005.filter(_fun75707); function _fun75707(a0) { // fn#75707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9833:666, offset: 0x01db62c1, size: 43 bytes, params: 2, frame: 12 const value = environment.__proto__; return !(adminGuildEntryIds != null && adminGuildEntryIds.has(a0.id)); } } function _fun75708() { // fn#75708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9833:726, offset: 0x01db62ec, size: 28 bytes, params: 1, frame: 11 return Module00005.filter(_fun75709); function _fun75709(a0) { // fn#75709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9833:740, offset: 0x01db6308, size: 42 bytes, params: 2, frame: 12 const value = environment.__proto__; return adminGuildEntryIds?.has(a0.id); } } } } global.__d(_fun75697, 9647, [5, 57, 31, 1867, 3784, 4896, 9640, 661, 566, 4594, 9644, 2]) /* metro module 9647, dependencies: [5, 57, 31, 1867, 3784, 4896, 9640, 661, 566, 4594, 9644, 2] */;