/* Metro module 9672; source: modules/search/native/hooks/useSearchContext.tsx; dependencies: [31, 1379, 661, 44, 632, 2] */ function _fun75783(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:6, offset: 0x01db9aaa, size: 204 bytes, params: 8, frame: 20 const env0_0 = require; const closure = getChannelDetailsSearchContext; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importAll(31) /* metro dependency 31 */; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const env0_5 = (require(661) /* metro dependency 661: Constants */).SearchTypes; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/hooks/useSearchContext.tsx'); exports.useGuildSearchContext = useGuildSearchContext; exports.useGuildChannelSearchContext = useGuildChannelSearchContext; exports.getChannelDetailsSearchContext = closure; exports.useChannelDetailsSearchContext = useChannelDetailsSearchContext; } function getChannelDetailsSearchContext(a0, a1, a2) { // fn#75784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:138, offset: 0x01db9b76, size: 147 bytes, params: 4, frame: 17 var r0; if (a2) { (importDefault(44) /* metro dependency 44 */)(a1 != null, '[useChannelDetailsSearchContext] Thread must have a guild id'); r0 = {type: SearchTypes.THREAD, guildId: a1, channelId: a0}; } else { r0 = a1 == null ? {type: SearchTypes.CHANNEL, channelId: a0} : {type: SearchTypes.GUILD_CHANNEL, guildId: a1, channelId: a0}; } return r0; } function useGuildSearchContext(a0) { // fn#75785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:502, offset: 0x01db9c09, size: 44 bytes, params: 2, frame: 14 const env0_0 = a0; return env0_3.useMemo(_fun75786, [a0]); } function useGuildChannelSearchContext(a0, a1) { // fn#75787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:623, offset: 0x01db9c55, size: 55 bytes, params: 3, frame: 15 const env0_0 = a0; const env0_1 = a1; return env0_3.useMemo(_fun75788, [a0, a1]); } function useChannelDetailsSearchContext(a0, a1) { // fn#75789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:841, offset: 0x01db9cb4, size: 115 bytes, params: 3, frame: 17 const env0_0 = a0; const env0_1 = a1; return env0_3.useMemo(_fun75791, [a0, a1, (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore], _fun75790)]); } function _fun75786() { // fn#75786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:554, offset: 0x01db9c35, size: 32 bytes, params: 1, frame: 2 const GUILD = SearchTypes.GUILD; return {type: GUILD, guildId: env0_0}; } function _fun75788() { // fn#75788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:684, offset: 0x01db9c8c, size: 40 bytes, params: 1, frame: 3 const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL; return {type: GUILD_CHANNEL, guildId: env0_0, channelId: require}; } function _fun75790() { // fn#75790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:924, offset: 0x01db9d27, size: 57 bytes, params: 1, frame: 12 var r1; let value = environment.__proto__; value = ChannelStore.getChannel(env0_0); if (value == null) { r1 = undefined; } else { value = value.isThread(); r1 = value; } return r1 != null && r1; } function _fun75791() { // fn#75791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9858:1024, offset: 0x01db9d60, size: 33 bytes, params: 1, frame: 15 return getChannelDetailsSearchContext(env0_0, require, env0_2); }