/* Metro module 14436; source: modules/launchpad/native/shared/useChannelUnreadBadgeState.tsx; dependencies: [5096, 4605, 4864, 566, 5102, 2] */ import ReadStateStore from '../../../../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */ import UserGuildSettingsStore from '../../../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */ import NewChannelsStore from '../../../recent_channels/NewChannelsStore.tsx'; /* Metro dependency 5096 */ 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 IsOptInEnabledModule from '../../../opt_in_channels/isOptInEnabled.tsx'; /* Metro dependency 5102 */ function _fun109255(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14633:6, offset: 0x023434ad, size: 163 bytes, params: 8, frame: 20 let env0_0 = require; const closure = function(a0, a1) { var env0_0 = a0; var env0_1 = a1; return require(dependencyMap[3]).useStateFromStoresObject([ReadStateStore], _fun109257); }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/launchpad/native/shared/useChannelUnreadBadgeState.tsx'); exports.useChannelUnreadBadgeState = useChannelUnreadBadgeState; exports.useBaseChannelUnreadBadgeState = closure; function useBaseChannelUnreadBadgeState(a0, a1) { // fn#109256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14633:126, offset: 0x02343550, size: 74 bytes, params: 3, frame: 14 const env0_0 = a0; const env0_1 = a1; return (FluxModule).useStateFromStoresObject([ReadStateStore], _fun109257); function _fun109257() { // fn#109257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14633:216, offset: 0x0234359a, size: 132 bytes, params: 1, frame: 15 const object = {}; let readStateStoreBinding = ReadStateStore; object.ackMessageId = readStateStoreBinding.ackMessageId(env0_0.id); object.unread = !require && ReadStateStore.hasUnread(env0_0.id); readStateStoreBinding = ReadStateStore; const getMentionCount = readStateStoreBinding.getMentionCount; const binding = env0_0; object.mentionCount = Reflect.apply(getMentionCount, readStateStoreBinding, [binding.id]); object.isMentionLowImportance = ReadStateStore.getIsMentionLowImportance(binding.id); return object; } } function useChannelUnreadBadgeState(a0, a1) { // fn#109258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14633:508, offset: 0x0234361e, size: 219 bytes, params: 3, frame: 25 const env0_0 = a0; const {unread, mentionCount, isMentionLowImportance} = useBaseChannelUnreadBadgeState(a0, a1); const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([NewChannelsStore], _fun109259, [a0.guild_id, a0.id]); const value4 = (IsOptInEnabledModule).useOptInEnabledForGuild(a0.guild_id); object = {unread: unread}; object.resolvedUnreadSetting = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore], _fun109260); object.newChannel = value3; object.optInEnabled = value4; object.mentionCount = mentionCount; object.isMentionLowImportance = isMentionLowImportance; return object; function _fun109259() { // fn#109259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14633:680, offset: 0x023436f9, size: 38 bytes, params: 1, frame: 13 const newChannelsStoreBinding = NewChannelsStore; const shouldIndicateNewChannel = newChannelsStoreBinding.shouldIndicateNewChannel; const binding = env0_0; return Reflect.apply(shouldIndicateNewChannel, newChannelsStoreBinding, [binding.guild_id, binding.id]); } function _fun109260() { // fn#109260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14633:864, offset: 0x0234371f, size: 27 bytes, params: 1, frame: 11 return UserGuildSettingsStore.resolveUnreadSetting(env0_0); } } } global.__d(_fun109255, 14436, [5096, 4605, 4864, 566, 5102, 2]) /* metro module 14436, dependencies: [5096, 4605, 4864, 566, 5102, 2] */;