// Module ID: 17290 // Function ID: 17291 // Name: MessagePreview // Dependencies: [19, 8636, 1078, 21, 558, 568, 504, 1119, 17118, 13559, 2] // Module 17290 (MessagePreview) import initialize from "initialize" /* 504 */; import c from "c" /* 568 */; import util from "util" /* 1119 */; import noop from "module_19" /* 19 */; import MessagePreviewStore from "MessagePreviewStore" /* 8636 */; require = fn; const Constants = fn(1078); ({ AnalyticsSections, AnalyticsObjects } = Constants); const jsx = fn(21).jsx; const analyticsLocation = { section: AnalyticsSections.CHANNEL_SEARCH, object: AnalyticsObjects.CHANNEL_SEARCH }; const ReactCompilerGating = fn(558); const size = fn(2); const result = size.fileFinishedImporting("components_native/common/MessagePreview.tsx"); export default ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => { const cResult = c.c(12); ({ channelId, onBeforeJumpToMessage } = arg0); if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) { const items = [MessagePreviewStore]; const fn = function c() { return { messages: MessagePreviewStore.messages, jumpTargetId: MessagePreviewStore.jumpTargetId }; }; cResult[0] = items; cResult[1] = fn; tmp4 = items; tmp5 = fn; } else { [tmp4, tmp5] = cResult; } const stateFromStoresObject = initialize.useStateFromStoresObject(tmp4, tmp5); ({ messages, jumpTargetId } = stateFromStoresObject); if (cResult[2] === Symbol.for("react.memo_cache_sentinel")) { const intl = tmp(1119).intl; const stringResult = intl.string(tmp(1119).t["+TSRGD"]); cResult[2] = stringResult; let tmp8 = stringResult; } else { tmp8 = cResult[2]; } if (cResult[3] === jumpTargetId) { if (cResult[4] === onBeforeJumpToMessage) { let tmp10 = cResult[5]; } const _Symbol = Symbol; if (cResult[6] === Symbol.for("react.memo_cache_sentinel")) { class C { constructor() { return () => { closure_1_1(closure_1_2[8]).clearMessages(); }; } } const items1 = []; cResult[6] = C; cResult[7] = items1; let tmp12 = items1; const tmp11 = C; } else { class C { constructor() { return () => { closure_1_1(closure_1_2[8]).clearMessages(); }; } } tmp12 = cResult[7]; } const effect = noop.useEffect(tmp11, tmp12); if (cResult[8] === channelId) { class C { constructor() { return () => { closure_1_1(closure_1_2[8]).clearMessages(); }; } } } const obj2 = { channelId, messages, jumpToChatProps: tmp10, analyticsLocation }; const tmp18 = jsx(tmp(13559).ChatPreview, { channelId, messages, jumpToChatProps: tmp10, analyticsLocation }); cResult[8] = channelId; cResult[9] = tmp10; cResult[10] = messages; cResult[11] = tmp18; } const obj3 = { jumpToChatText: tmp8, jumpTargetId, onBeforeJumpToMessage }; cResult[3] = jumpTargetId; cResult[4] = onBeforeJumpToMessage; cResult[5] = obj3; tmp10 = obj3; }) : ((channelId) => { const onBeforeJumpToMessage = channelId.onBeforeJumpToMessage; const items = [MessagePreviewStore]; const stateFromStoresObject = onBeforeJumpToMessage(504).useStateFromStoresObject(items, () => ({ messages: MessagePreviewStore.messages, jumpTargetId: MessagePreviewStore.jumpTargetId })); const jumpTargetId = stateFromStoresObject.jumpTargetId; const items1 = [jumpTargetId, onBeforeJumpToMessage]; const memo = noop.useMemo(() => { const obj = { jumpToChatText: null, jumpTargetId: null, onBeforeJumpToMessage: null }; const intl = util.intl; obj.jumpToChatText = intl.string(util.t["+TSRGD"]); obj.jumpTargetId = jumpTargetId; obj.onBeforeJumpToMessage = onBeforeJumpToMessage; return obj; }, items1); const effect = noop.useEffect(() => () => { jumpTargetId(closure_1_2[8]).clearMessages(); }, []); return jsx(onBeforeJumpToMessage(13559).ChatPreview, { channelId: channelId.channelId, messages: stateFromStoresObject.messages, jumpToChatProps: memo, analyticsLocation }); });