/* Metro module 11289; source: modules/chat/native/ChatViewStickyHeader.tsx; dependencies: [57, 31, 9734, 33, 11290, 11294, 11295, 11296, 11306, 11309, 11310, 11312, 11314, 11317, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseUnreadSettingNotice from '../../notifications/settings_unread_notice/utils/useUnreadSettingNotice.tsx'; /* Metro dependency 11310 */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../self_mod/Constants.tsx'; /* Metro dependency 9734 */
import * as UseStrangerDangerWarningModule from '../../self_mod/stranger_danger/hooks/useStrangerDangerWarning.tsx'; /* Metro dependency 11290 */
import * as UseInappropriateConversationBannerForChannelModule from '../../self_mod/inappropriate_conversation/hooks/useInappropriateConversationBannerForChannel.tsx'; /* Metro dependency 11294 */
import * as UseLikelyAtoWarningModule from '../../ato_alerts/hooks/useLikelyAtoWarning.tsx'; /* Metro dependency 11295 */
function _fun86174(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11475:6, offset: 0x01f8a8b4, size: 231 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactModule;
value = value.memo(value.forwardRef(_fun86176));
(FileImportTrackerModule).fileFinishedImporting('modules/chat/native/ChatViewStickyHeader.tsx');
exports.default = value;
function ChatViewStickyHeaderAccountSafetyWarnings({channelId, senderId}) { // fn#86175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11475:190, offset: 0x01f8a99b, size: 279 bytes, params: 2, frame: 21
var r0;
var value;
const value2 = (UseStrangerDangerWarningModule).useStrangerDangerWarning(channelId);
const value3 = (UseInappropriateConversationBannerForChannelModule).useInappropriateConversationBannerForChannel(channelId,
LOCATION_CONTEXT_MOBILE);
const value4 = (UseLikelyAtoWarningModule).useLikelyAtoWarning(channelId);
if (value4 != null) {
value = importDefault(11296) /* metro dependency 11296: LikelyAtoWarningBanner */;
value = ((Component) => )(value);
r0 = value;
} else if (value2 != null) {
value = importDefault(11306) /* metro dependency 11306: StrangerDangerWarningBanner */;
value = ((Component) => )(value);
r0 = value;
} else if (value3 != null) {
value = importDefault(11309) /* metro dependency 11309: InappropriateConversationWarningBanner */;
value = ((Component) => )(value);
r0 = value;
} else {
r0 = null;
}
return r0;
}
function _fun86176({channel, scrollToNewMessages}, a1) { // fn#86176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11475:611, offset: 0x01f8aab2, size: 370 bytes, params: 3, frame: 25
const binding = env0_4;
const [property, env0_1] = Module00057(binding.useState(false), 2);
const {showUnreadsNotice,
clearUnreadsNotice} = (UseUnreadSettingNotice)(channel);
binding.useImperativeHandle(a1, function() {
return {onChatViewScrolled: _fun86178};
});
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const items2 = [
channel.isForumPost() && property
? ((Component) => )(importDefault(11312) /* metro dependency 11312: ForumPostActionBar */)
: null,
];
items2[1] = (
channel.isDM()
? (
)
: null
);
items2[2] = (
showUnreadsNotice
? ((Component) => )(importDefault(11314) /* metro dependency 11314: UnreadSettingNotice */)
: null
);
items2[3] = ((Component) => )(importDefault(11317) /* metro dependency 11317: ChatBanner */);
return (
<>
{items2}
>
);
function _fun86177() { // fn#86177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11475:792, offset: 0x01f8ac24, size: 18 bytes, params: 1, frame: 2
return {onChatViewScrolled: onChatViewScrolled};
function onChatViewScrolled({isFirstMessageVisible}) { // fn#86178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11475:817, offset: 0x01f8ac36, size: 47 bytes, params: 2, frame: 12
const channelBinding = channel;
if (channelBinding.isForumPost()) {
env1_1(!isFirstMessageVisible);
}
}
}
}
}
global.__d(_fun86174, 11289, [57, 31, 9734, 33, 11290, 11294, 11295, 11296, 11306, 11309, 11310, 11312, 11314,
11317,
2]) /* metro module 11289, dependencies: [57, 31, 9734, 33, 11290, 11294, 11295, 11296, 11306, 11309, 11310, 11312, 11314, 11317, 2] */;