/* Metro module 8630; source: modules/emojis/hooks/useEmojiAndSource.tsx; dependencies: [5, 57, 31, 1867, 6540, 6820, 661, 3800, 632, 2] */ function _fun68098(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8815:6, offset: 0x01c3e7c4, size: 245 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_2 = importDefault(5) /* metro dependency 5 */; const env0_3 = importDefault(57) /* metro dependency 57 */; const env0_4 = importAll(31) /* metro dependency 31 */; const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */; const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */; const expressionSourceRecordModule = require(6820) /* metro dependency 6820: ExpressionSourceRecord */; const env0_7 = expressionSourceRecordModule.ExpressionSourceGuildRecord; const env0_8 = expressionSourceRecordModule.EmojiSourceDataTypes; const env0_9 = expressionSourceRecordModule.getEmojiSourceData; const env0_10 = (require(661) /* metro dependency 661: Constants */).GuildFeatures; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/emojis/hooks/useEmojiAndSource.tsx'); exports.useEmojiAndSource = useEmojiAndSource; } function useEmojiAndSource({emojiId, refreshPositionKey}) { // fn#68099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8815:356, offset: 0x01c3e8b9, size: 449 bytes, params: 2, frame: 27 let env0_3 = undefined; let env0_4 = undefined; const {joinedEmojiSourceGuildRecord, emoji} = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresObject([EmojiStore, GuildStore], _fun68100); const value4 = joinedEmojiSourceGuildRecord != null; const r10 = (value4 ? joinedEmojiSourceGuildRecord != null && joinedEmojiSourceGuildRecord.features.has(GuildFeatures.DISCOVERABLE) : !value4) && emojiId != null; let binding = env0_4; let useState = binding.useState; const value9 = Reflect.apply(useState, binding, [r10]); const binding2 = env0_3; const value10 = binding2(value9, 2); const property = value10[0]; env0_3 = value10[1]; useState = binding.useState; const value11 = binding2(Reflect.apply(useState, binding, [null]), 2); const property2 = value11[0]; env0_4 = value11[1]; const r14 = joinedEmojiSourceGuildRecord != null ? ExpressionSourceGuildRecord.createFromGuildRecord(joinedEmojiSourceGuildRecord) : null; binding = env0_4; const value12 = binding.useState(r14); const binding3 = env0_3; let value = binding3(value12, 2); const property3 = value[0]; const env0_5 = value[1]; useState = binding.useState; value = binding3(Reflect.apply(useState, binding, [null]), 2); const property4 = value[0]; const env0_6 = value[1]; const env0_7 = binding.useRef(refreshPositionKey); binding.useEffect(_fun68101); binding.useEffect(_fun68102, [emojiId, r10]); return {expressionSourceGuild: property3, expressionSourceApplication: property4, sourceType: property2, joinedEmojiSourceGuildRecord: joinedEmojiSourceGuildRecord, hasJoinedEmojiSourceGuild: value4, emoji: emoji, isFetching: property}; } function _fun68100() { // fn#68100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8815:439, offset: 0x01c3ea7a, size: 150 bytes, params: 1, frame: 16 const emojiIdBinding = emojiId; const value3 = null; const r5 = value3 != emojiIdBinding ? EmojiStore.getCustomEmojiById(emojiIdBinding) : value3; const value5 = undefined; const type = value3 == r5 ? value5 : r5.type; const EmojiTypes = (require(3800) /* metro dependency 3800: EmojiTypes */).EmojiTypes; const GUILD = EmojiTypes.GUILD; return type === GUILD ? {emoji: r5, joinedEmojiSourceGuildRecord: GuildStore.getGuild(value3 == r5 ? value5 : r5.guildId)} : {'emoji': null, 'joinedEmojiSourceGuildRecord': null}; } function _fun68101() { // fn#68101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8815:1040, offset: 0x01c3eb10, size: 21 bytes, params: 1, frame: 2 env0_7.current = refreshPositionKey; } function _fun68102() { // fn#68102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8815:1073, offset: 0x01c3eb25, size: 87 bytes, params: 1, frame: 12 if (env0_7.current != null) { env0_7.current(); } if (env0_2) { _fun68103()(); } else if (env0_7.current != null) { env0_7.current(); } } function _fun68103() { // fn#68103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8815:1113, offset: 0x01c3eb7c, size: 36 bytes, params: 1, frame: 12 const env0_0 = env2_2(_fun68105); return _fun68106; } function* _fun68105() { // fn#68105, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8815:1133, offset: 0x01c3ebab, size: 196 bytes, params: 1, frame: 17 var r2; var value4; var binding; var value5; var type; var value7; if (true) { value = environment.__proto__.__proto__.__proto__; var value3 = null; if (value3 != require) { value4 = environment.__proto__.__proto__.__proto__.__proto__; binding = env4_9; yield binding(require); value5 = undefined; if (false) { return value5; } r2 = value5; if (value3 != r2) { binding = env3_4; type = r2.type; binding(type); type = r2.type; value7 = environment.__proto__.__proto__.__proto__.__proto__; if (env4_8.APPLICATION === type) { EmojiStore(r2.application); } else if (env4_8.GUILD === type) { GuildStore(r2.guild); } } env3_3(false); if (value3 != ExpressionSourceGuildRecord.current) { ExpressionSourceGuildRecord.current(); } } else { r2 = value3; if (value3 != r2) { binding = env3_4; type = r2.type; binding(type); type = r2.type; value7 = environment.__proto__.__proto__.__proto__.__proto__; if (env4_8.APPLICATION === type) { EmojiStore(r2.application); } else if (env4_8.GUILD === type) { GuildStore(r2.guild); } } env3_3(false); if (value3 != ExpressionSourceGuildRecord.current) { ExpressionSourceGuildRecord.current(); } } } }