/* Metro module 11164; source: modules/channel_following/useChannelFollowerStats.tsx; dependencies: [57, 31, 11165, 672, 566, 11166, 2] */ import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */ import Durations from '../../utils/Durations.tsx'; /* Metro dependency 672 */ import ChannelFollowerStatsStore from '../../stores/ChannelFollowerStatsStore.tsx'; /* Metro dependency 11165 */ 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 FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ function _fun85241(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11350:6, offset: 0x01f68b15, size: 185 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const Millis = (Durations).Millis; const HOUR = Millis.HOUR; const env0_6 = 1 * HOUR; (FileImportTrackerModule).fileFinishedImporting('modules/channel_following/useChannelFollowerStats.tsx'); exports.default = useChannelFollowerStats; function useChannelFollowerStats(a0) { // fn#85242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11350:247, offset: 0x01f68bce, size: 175 bytes, params: 2, frame: 19 const env0_0 = a0; const [property, env0_2] = Module00057(ReactModule.useState(false), 2); const value = (FluxModule).useStateFromStores([ChannelFollowerStatsStore], _fun85243, [a0]); ReactModule.useEffect(_fun85244, [a0, value, property]); return [value, property]; function _fun85243() { // fn#85243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11350:361, offset: 0x01f68c7d, size: 29 bytes, params: 1, frame: 11 return ChannelFollowerStatsStore.getFollowerStatsForChannel(env0_0); } function _fun85244() { // fn#85244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11350:423, offset: 0x01f68c9a, size: 150 bytes, params: 1, frame: 14 var value3; var value4; var value5; if (Module00057 == null) { if (env0_1) { if (Module00057 != null && env0_1) { env0_2(false); } } else { env0_2(true); value5 = environment.__proto__; (importDefault(11166) /* metro dependency 11166: ChannelFollowerActionCreators */).fetchChannelFollowerStats(env0_0); } } else { value3 = global.Date.now() - Module00057.lastFetched; value4 = environment.__proto__; if (value3 > env1_6) { if (env0_1) { if (Module00057 != null && env0_1) { env0_2(false); } } else { env0_2(true); value5 = environment.__proto__; (importDefault(11166) /* metro dependency 11166: ChannelFollowerActionCreators */).fetchChannelFollowerStats(env0_0); } } else if (Module00057 != null && env0_1) { env0_2(false); } } } } } global.__d(_fun85241, 11164, [57, 31, 11165, 672, 566, 11166, 2]) /* metro module 11164, dependencies: [57, 31, 11165, 672, 566, 11166, 2] */;