/* Metro module 14854; source: modules/icymi/native/ICYMIShared.tsx; dependencies: [31, 27, 6898, 1379, 1945, 3784, 1878, 661, 33, 7230, 9311, 6697, 9783, 14783, 5097, 6837, 5459, 7067, 4044, 14815, 477, 697, 1305, 7599, 6819, 4584, 5278, 4573, 4788, 14855, 8638, 566, 4617, 9580, 8743, 6704, 9579, 14517, 9133, 1244, 14816, 4048, 3860, 4000, 4017, 4504, 4603, 6682, 6818, 6622, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import UseTheme from '../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import GuildIcon from '../../guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
import SafeTransitionToNative from '../../links/safeTransitionTo.native.tsx'; /* Metro dependency 6837 */
import ThreadMessageStore from '../../threads/ThreadMessageStore.tsx'; /* Metro dependency 6898 */
import MessageActionCreators from '../../../actions/MessageActionCreators.tsx'; /* Metro dependency 7067 */
import ClipView from '../../../design/components/Icon/native/ClipView.tsx'; /* Metro dependency 7599 */
import ShowUserProfileActionSheet from '../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ColorUtilsModule from '../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as ClientModule from '../../../flow/Client.tsx'; /* Metro dependency 4044 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseFontScaleModule from '../../screen/native/useFontScale.tsx'; /* Metro dependency 4584 */
import * as NicknameUtilsModule from '../../../utils/NicknameUtils.tsx'; /* Metro dependency 4617 */
import * as ReadStateActionCreatorsModule from '../../../actions/ReadStateActionCreators.tsx'; /* Metro dependency 5097 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as AnnouncementsIconModule from '../../../design/components/Icon/native/redesign/generated/AnnouncementsIcon.tsx'; /* Metro dependency 6704 */
import * as GuildIconModule from '../../guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
import * as ICYMITypesModule from '../ICYMITypes.tsx'; /* Metro dependency 7230 */
import * as ClipViewModule from '../../../design/components/Icon/native/ClipView.tsx'; /* Metro dependency 7599 */
import * as ICYMIUtilsModule from '../ICYMIUtils.tsx'; /* Metro dependency 9579 */
import * as CreateICYMIStylesModule from './createICYMIStyles.tsx'; /* Metro dependency 14815 */
import * as ICYMIContextModule from './ICYMIContext.tsx'; /* Metro dependency 14816 */
function _fun112249(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:6, offset: 0x023c0ca9, size: 560 bytes, params: 8, frame: 23
const env0_0 = require;
const Separator_1122502 = Separator_112250;
const closure2 = function(a0) {
var r0;
var value = a0;
if (value.length > 20) {
value = value.slice(0, 17);
value = '' + value + '...';
r0 = value;
} else {
r0 = value;
}
return r0;
};
const CutoutGuildIcon2 = CutoutGuildIcon;
const GuildContentPost2 = GuildContentPost;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ConstantsModule;
const env0_10 = value.AnalyticsObjects;
const env0_11 = value.AnalyticsObjectTypes;
const env0_12 = value.AnalyticsPages;
const env0_13 = value.DEFAULT_ROLE_COLOR_HEX;
const env0_14 = value.MAX_MESSAGES_FOR_JUMP;
const env0_15 = value.MessageFlags;
const env0_16 = value.Permissions;
const env0_17 = value.Routes;
value = require(33) /* metro dependency 33 */;
const env0_18 = value.jsx;
const env0_19 = value.jsxs;
const env0_20 = value.Fragment;
const env0_21 = (CreateICYMIStylesModule).createICYMIStyles(_fun112256);
object = {code: 'function ICYMISharedTsx1(){const{interpolateColor,progress,bgColor,bgColorHighlighted}=this.__closure;return{backgroundColor:interpolateColor(progress.get(),[0,1],[bgColor,bgColorHighlighted])};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/icymi/native/ICYMIShared.tsx');
exports.navigateToPost = navigateToPost;
exports.Separator = Separator_1122502;
exports.truncateUsername = closure2;
exports.CutoutGuildIcon = CutoutGuildIcon2;
exports.GuildContentPost = GuildContentPost2;
exports.AnnouncementContentPost = AnnouncementContentPost;
exports.GuildEventPost = GuildEventPost;
exports.MessageContentPost = MessageContentPost;
exports.SimplePost = SimplePost;
exports.ThreadAsComments = ThreadAsComments;
function Separator_112250() { // fn#112250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:2353, offset: 0x023c0ed9, size: 41 bytes, params: 1, frame: 14
return ;
}
function CutoutGuildIconWithUser({guild, author}) { // fn#112252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:2488, offset: 0x023c0f43, size: 146 bytes, params: 2, frame: 23
const value2 = env0_21();
const Avatar = (NativeModule).Avatar;
const authorIcon = value2.authorIcon;
const id = guild.id;
const AvatarSizes = (NativeModule).AvatarSizes;
const XSMALL = AvatarSizes.XSMALL;
return (
}
/>
);
}
function CutoutGuildIcon({guild, icon}) { // fn#112253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:2696, offset: 0x023c0fd5, size: 217 bytes, params: 2, frame: 24
const CutoutShape = (ClipViewModule).CutoutShape;
const Circle = CutoutShape.Circle;
const items2 = [{'shape': null, 'x': 16, 'y': 14, 'size': 32, shape: Circle}];
let value = GuildIcon;
const GuildIconSizes = (GuildIconModule).GuildIconSizes;
const NORMAL = GuildIconSizes.NORMAL;
value = (
{((Component) => )(value)}
);
return (
{value}
{icon}
);
}
function GuildContentPost({guild, channel, timestamp, hideTimestamp, children, avatar, title, subtitle, id, type, onHeaderPress, onHeaderLongPress, disableInteractions}) { // fn#112254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:2938, offset: 0x023c10ae, size: 743 bytes, params: 2, frame: 49
const value2 = env0_21();
const value3 = (UseFontScaleModule).useFontScale();
const jsxRuntimeEnv0_20Binding = jsxRuntimeEnv0_20;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
return (
<>
1.8 ? value2.channelNameAndAccessoryLarge : value2.channelNameAndAccessory}>
{avatar}
{title}
{!hideTimestamp && ((Text) => {(require(4788) /* metro dependency 4788: NotificationCenterUtils */).getRelativeTimestamp(timestamp)})((require(4573) /* metro dependency 4573: Text */).Text)}
{
disableInteractions || guild == null
? null
: ((PressableOpacity) => {((MoreHorizontalIcon) => )((require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon)})((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)
}
{subtitle}
{children}
>
);
function GuildContentPostOnPress() { // fn#112255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:3650, owner: GuildContentPost.onPress, offset: 0x023c1395, size: 98 bytes, params: 1, frame: 15
const value = environment.__proto__;
return (require(14855) /* metro dependency 14855: openDetailsActionSheet */).openDetailsActionSheet({guildId: guild.id,
channelId: channel?.id, id: id, type: type});
}
}
function _fun112256(a0) { // fn#112256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:417, offset: 0x023c13f7, size: 822 bytes, params: 2, frame: 18
const object = {};
const isAndroid2 = PlatformUtilsModule.isAndroid();
const value2 = 0;
object.simplePostContent = {'flex': 1, 'marginTop': null, 'overflow': 'hidden', marginTop: isAndroid2 ? -2 : value2};
object.content = {'flex': 1, 'marginTop': null, 'overflow': 'hidden',
marginTop: PlatformUtilsModule.isAndroid() ? -2 : value2, paddingTop: a0.margin};
const object4 = {'position': 'absolute', 'right': -4, 'bottom': -2, 'padding': 4};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object4.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object.insetIconWrapper = object4;
object.authorIcon = {'position': 'absolute', 'right': -4, 'bottom': -2};
let TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object.moreDetailsIcon = {tintColor: TEXT_MUTED};
object.channelNameAndAccessory = {'flexDirection': 'row', 'justifyContent': 'space-between', 'alignItems': 'center',
paddingBottom: a0.margin, marginHorizontal: a0.margin};
object.channelNameAndAccessoryLarge = {flexDirection: 'column', paddingBottom: a0.margin,
marginHorizontal: a0.margin};
object.header = {'flexDirection': 'row', 'flexGrow': 1};
object.headerInfo = {'flexGrow': 1, 'flexShrink': 1, marginLeft: a0.margin};
object.title = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
'marginBottom': 2};
object.titleLeft = {'flexShrink': 1, 'flexGrow': 0, 'flexDirection': 'row', 'alignItems': 'center', 'gap': 6};
const object7 = {'flexDirection': 'row', 'justifyContent': 'space-between'};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.subTitleContainer = object7;
object.subtitle = {'flexShrink': 1, 'flexGrow': 0, 'width': '100%'};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.genContentSubtitle = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
object.genContentSubtitleChannel = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 2, 'flex': 1};
object.subtitleTrailing = {paddingVertical: 1};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object.separator = {'height': 1, 'width': '100%', backgroundColor: BORDER_SUBTLE};
object.eventsSubtitle = {'flexDirection': 'row', 'alignItems': 'center'};
const object8 = {'padding': 8, 'backgroundColor': null, 'borderRadius': null, 'display': 'flex',
'flexDirection': 'row', 'alignItems': 'center', 'gap': 8};
REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object8.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.comments = object8;
object.recentCommentText = {'flexGrow': 1, 'flexShrink': 1, 'marginRight': 12};
object.commentCount = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': 2,
'justifySelf': 'end'};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object.commentsIcon = {'width': 20, 'height': 20, tintColor: INTERACTIVE_TEXT_DEFAULT};
TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object.chevron = {tintColor: TEXT_MUTED};
return object;
}
function navigateToPost(a0, a1, a2) { // fn#112257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:4260, offset: 0x023c172d, size: 158 bytes, params: 4, frame: 19
const env0_0 = a0;
const env0_1 = a2;
global.setTimeout(_fun112258, 1500);
(SafeTransitionToNative)(Routes.CHANNEL(a1, a0, a2),
{'openChannel': true, 'navigationReplace': false});
if (a2 != null) {
(require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */).runAfterInteractions(_fun112259, 150);
}
function _fun112258() { // fn#112258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:4303, offset: 0x023c17cb, size: 105 bytes, params: 1, frame: 20
const ack = ReadStateActionCreatorsModule.ack;
const binding = env0_0;
const ICYMI = AnalyticsPages.ICYMI;
const ACK_MESSAGE_VIEWED = AnalyticsObjects.ACK_MESSAGE_VIEWED;
const ACK_SEMI_AUTOMATIC = AnalyticsObjectTypes.ACK_SEMI_AUTOMATIC;
Reflect.apply(ack, ReadStateActionCreatorsModule, [binding, {page: ICYMI, object: ACK_MESSAGE_VIEWED,
objectType: ACK_SEMI_AUTOMATIC}, true, true, importDefault]);
}
function _fun112259() { // fn#112259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:4520, offset: 0x023c1834, size: 114 bytes, params: 1, frame: 16
const defaultImport = MessageActionCreators;
const fetchMessages = defaultImport.fetchMessages;
const object = {};
object.channelId = env0_0;
object.limit = MAX_MESSAGES_FOR_JUMP;
const object2 = {};
object2.messageId = importDefault;
object2.flash = true;
const JumpTypes = (ClientModule).JumpTypes;
const ANIMATED = JumpTypes.ANIMATED;
object2.jumpType = ANIMATED;
object.jump = object2;
Reflect.apply(fetchMessages, defaultImport, [object]);
}
}
function AnnouncementContentPost({guild, channel, author, timestamp, children, id, mentioned, onHeaderPress, onHeaderLongPress}) { // fn#112260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:4798, offset: 0x023c18a6, size: 678 bytes, params: 2, frame: 34
const id2 = id;
const value3 = env0_21();
const useStateFromStores = FluxModule.useStateFromStores;
const r20 = Reflect.apply(useStateFromStores, FluxModule, [[GuildMemberStore], function() {
return GuildMemberStore.getMember(guild.id, author.id);
}])?.colorString ?? DEFAULT_ROLE_COLOR_HEX;
const value4 = (NicknameUtilsModule).useName(guild.id, channel.id, author);
const value5 = id2.useCallback(_fun112262, [author.id, channel.id, id]);
const guildContentPostBindingProps = {guild: guild, channel: channel, timestamp: timestamp,
avatar: };
const Text = (TextModule).Text;
guildContentPostBindingProps.title = (
{guild.name}
);
const subtitle = value3.subtitle;
const Text2 = (TextModule).Text;
const items2 = [
{truncateUsername(value4) + ' '}
,
];
const AnnouncementsIcon = (AnnouncementsIconModule).AnnouncementsIcon;
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
items2[1] = ;
const contentTypeToText = ICYMIUtilsModule.contentTypeToText;
const ContentType = (ICYMITypesModule).ContentType;
const ANNOUNCEMENT = ContentType.ANNOUNCEMENT;
items2[2] = ' ' + Reflect.apply(contentTypeToText, ICYMIUtilsModule, [ANNOUNCEMENT, mentioned]);
guildContentPostBindingProps.subtitle = (
{items2}
);
guildContentPostBindingProps.onHeaderPress = onHeaderPress;
guildContentPostBindingProps.onHeaderLongPress = onHeaderLongPress;
guildContentPostBindingProps.id = id;
guildContentPostBindingProps.type = 'announcement';
return (
{children}
);
function _fun112262() { // fn#112262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:5107, offset: 0x023c1b76, size: 153 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = value.itemInteracted;
const idBinding = id;
Reflect.apply(itemInteracted, value, [idBinding, 'announcement', 'open_profile']);
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).feedItemActioned({itemId: idBinding,
itemType: 'announcement', actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'item_header',
'actionIntentType': 'open', 'actionDestinationType': 'user'}});
(ShowUserProfileActionSheet)({userId: author.id,
channelId: channel.id});
}
}
function GuildEventPost({guild, channel, children, event, type, onHeaderPress}) { // fn#112263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:6106, offset: 0x023c1c0f, size: 1114 bytes, params: 2, frame: 37
var object2;
var items3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
var t;
var items2;
const type2 = type;
const value3 = env0_21();
const r15 = event.host_id ?? event.creator_id;
(require(14517) /* metro dependency 14517: useEnsureHydratedUsers */).useEnsureHydratedUsers(event.guild_id,
r15 != null ? [r15] : []);
const user = (FluxModule).useStateFromStores([UserStore], _fun112264);
const value4 = (FluxModule).useStateFromStores([GuildMemberStore], _fun112265);
const value5 = type2.useCallback(_fun112266, [user, channel?.id, event.id, value4?.highestRoleId, type]);
const r23 = value4?.colorString ?? DEFAULT_ROLE_COLOR_HEX;
const value6 = event.host_id != null;
const guildContentPostBindingProps = {guild: guild, channel: channel, timestamp: 0, hideTimestamp: true,
avatar: user != null ? : ((Component) => )(importDefault(6819) /* metro dependency 6819: GuildIcon */)};
const Text = (TextModule).Text;
guildContentPostBindingProps.title = (
{guild.name}
);
const subtitle = value3.subtitle;
const jsxRuntimeEnv0_20Binding = jsxRuntimeEnv0_20;
if (user != null) {
items2 = [
{truncateUsername(user.username) + ' '}
,
];
items2[1] = ((CalendarIcon) => )((require(9133) /* metro dependency 9133: CalendarIcon */).CalendarIcon);
string = intl.string;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
items2[2] = value6 ? ' ' + Reflect.apply(string, intl, [t['42OrO4']]) : ' ' + Reflect.apply(string, intl,
[t.Vu15se]);
object2 = {children: items2};
} else {
const CalendarIcon = (require(9133) /* metro dependency 9133: CalendarIcon */).CalendarIcon;
items3 = [
,
];
items3[1] = ' ' + intl.string((require(1244) /* metro dependency 1244: indexNative */).t.T7MIsc);
object2 = {children: items3};
}
guildContentPostBindingProps.subtitle = (
{((Fragment) => )(jsxRuntimeEnv0_20Binding)}
);
guildContentPostBindingProps.id = event.id;
guildContentPostBindingProps.type = type;
guildContentPostBindingProps.onHeaderPress = onHeaderPress;
return (
{children}
);
function _fun112264() { // fn#112264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:6342, offset: 0x023c2069, size: 27 bytes, params: 1, frame: 11
return UserStore.getUser(ReactNativeModule.View);
}
function _fun112265() { // fn#112265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:6396, offset: 0x023c2084, size: 50 bytes, params: 1, frame: 14
const value2 = null;
return value2 != ReactNativeModule.View ? GuildMemberStore.getMember(guild.id, ReactNativeModule.View) : value2;
}
function _fun112266() { // fn#112266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:6452, offset: 0x023c20b6, size: 225 bytes, params: 1, frame: 22
var id;
var value2;
var value3;
var defaultImport;
var itemInteracted;
var eventBinding;
var defaultImport2;
var feedItemActioned;
var object;
var defaultImport3;
if (user != null) {
value2 = environment.__proto__;
value3 = undefined;
defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
itemInteracted = defaultImport.itemInteracted;
eventBinding = event;
id = eventBinding.id;
Reflect.apply(itemInteracted, defaultImport, [id, type, 'open_profile']);
defaultImport2 = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
feedItemActioned = defaultImport2.feedItemActioned;
id = eventBinding.id;
Reflect.apply(feedItemActioned, defaultImport2, [{itemId: id, itemType: 'guild_event',
actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'item_header',
'actionIntentType': 'open', 'actionDestinationType': 'user'}}]);
defaultImport3 = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
object = {};
id = user.id;
object.userId = id;
object.roleId = env0_6 == null ? value3 : env0_6.highestRoleId;
id = channel == null ? value3 : channel.id;
object.channelId = id;
defaultImport3(object);
}
}
}
function MessageContentPost({guild, channel, timestamp, author, message, children, id, type, onHeaderPress, onHeaderLongPress}) { // fn#112267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:7857, offset: 0x023c2197, size: 916 bytes, params: 2, frame: 36
const message2 = message;
let binding = message2;
const value2 = binding.useMemo(_fun112268, [channel, message]);
const r23 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
return GuildMemberStore.getMember(guild.id, author.id);
})?.colorString ?? DEFAULT_ROLE_COLOR_HEX;
const value4 = (NicknameUtilsModule).useName(guild.id, channel.id, author);
const ContentType = (require(7230) /* metro dependency 7230: ICYMITypes */).ContentType;
const POPULAR_MESSAGE = ContentType.POPULAR_MESSAGE;
const r19 = POPULAR_MESSAGE === value2 ? (require(9311) /* metro dependency 9311: FireIcon */).FireIcon : (require(7230) /* metro dependency 7230: ICYMITypes */).ContentType.IMAGE === value2 ? (require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon : (require(7230) /* metro dependency 7230: ICYMITypes */).ContentType.VIDEO === value2 ? (require(9783) /* metro dependency 9783: CirclePlayIcon */).CirclePlayIcon : (require(14783) /* metro dependency 14783: LightbulbIcon */).LightbulbIcon;
binding = message2;
const value5 = binding.useCallback(_fun112270, [author.id, channel.id, id, type]);
const useContext = binding.useContext;
const ICYMIContext = (ICYMIContextModule).ICYMIContext;
const margin = Reflect.apply(useContext, binding, [ICYMIContext]).margin;
const guildContentPostBindingProps = {guild: guild, channel: channel, timestamp: timestamp,
avatar: };
const Text = (TextModule).Text;
guildContentPostBindingProps.title = (
{guild.name}
);
const object2 = {marginRight: margin};
const Text2 = (TextModule).Text;
const items2 = [
{truncateUsername(value4) + ' '}
,
];
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
items2[1] = ((Component) => )(r19);
items2[2] = ' ' + ICYMIUtilsModule.contentTypeToText(value2);
guildContentPostBindingProps.subtitle = (
{items2}
);
guildContentPostBindingProps.onHeaderPress = onHeaderPress;
guildContentPostBindingProps.onHeaderLongPress = onHeaderLongPress;
guildContentPostBindingProps.id = id;
guildContentPostBindingProps.type = type;
return (
{children}
);
function _fun112268() { // fn#112268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:8015, offset: 0x023c252b, size: 50 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(9579) /* metro dependency 9579: ICYMIUtils */;
return value.determineContentType(channel, message);
}
function _fun112270() { // fn#112270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:8481, offset: 0x023c255d, size: 157 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */;
const itemInteracted = value.itemInteracted;
const idBinding = id;
Reflect.apply(itemInteracted, value, [idBinding, type, 'open_profile']);
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).feedItemActioned({itemId: idBinding,
itemType: 'message', actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'item_header',
'actionIntentType': 'open', 'actionDestinationType': 'user'}});
(ShowUserProfileActionSheet)({userId: author.id,
channelId: channel.id});
}
}
function SimplePost({children, hideDivider, highlight}) { // fn#112271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:9441, offset: 0x023c25fa, size: 544 bytes, params: 2, frame: 26
var items2;
var items3;
highlight = !(highlight === undefined) && highlight;
const value2 = env0_21();
const value3 = (UseTheme)();
const useToken = UseTokenModule.useToken;
const MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT = (Native).colors.MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT;
const value4 = Reflect.apply(useToken, UseTokenModule, [MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT, value3]);
const hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const BRAND_360 = (Native).unsafe_rawColors.BRAND_360;
const value5 = Reflect.apply(hexWithOpacity, ColorUtilsModule, [BRAND_360, 0.25]);
const value6 = (ReanimatedRexportModule).useSharedValue(0);
const env0_3 = value6;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const SimplePostC2 = SimplePostC;
let object = {};
object.interpolateColor = ReanimatedRexportModule.interpolateColor;
object.progress = value6;
object.bgColor = value4;
object.bgColorHighlighted = value5;
SimplePostC2.__closure = object;
SimplePostC2.__workletHash = 11116019021445;
SimplePostC2.__initData = env0_22;
const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [SimplePostC2]);
env0_3.useEffect(_fun112273, [highlight, value6]);
const jsxRuntimeEnv0_20Binding = jsxRuntimeEnv0_20;
object = {};
if (highlight) {
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items3 = [
{children}
,
];
items3[1] = (
hideDivider
? null
: (
)
);
object.children = items3;
} else {
items2 = [
{children}
,
];
items2[1] = (
hideDivider
? null
: (
)
);
object.children = items2;
}
return ((Fragment) => )(jsxRuntimeEnv0_20Binding);
function SimplePostC() { // fn#112272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:9733, owner: SimplePost.c, offset: 0x023c281a, size: 92 bytes, params: 1, frame: 17
const object = {};
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object.backgroundColor = value.interpolateColor(env0_3.get(), [0, 1], [env0_1, env0_2]);
return object;
}
function _fun112273() { // fn#112273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:9983, offset: 0x023c2876, size: 161 bytes, params: 1, frame: 23
var binding;
var set;
var withSequence;
var value2;
var moduleValue2;
var withDelay;
var moduleValue3;
var value;
if (highlight) {
binding = env0_3;
set = binding.set;
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withSequence = value.withSequence;
value2 = (require(4504) /* metro dependency 4504: timing */).withTiming(1, {duration: 500});
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = moduleValue2.withDelay;
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [Reflect.apply(withSequence, value, [value2, Reflect.apply(withDelay, moduleValue2,
[500, moduleValue3.withTiming(0, {duration: 350})])])]);
}
}
}
function ThreadAsComments({guild, parentMessage, onPress, style, inForum}) { // fn#112274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:10333, offset: 0x023c2917, size: 1027 bytes, params: 2, frame: 30
var r18;
var r11;
const PressableHighlight = (PressablesModule).PressableHighlight;
var items2;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var defaultImport;
var items3;
const value3 = env0_21();
const {thread, messageCount, mostRecentMessage} = useThread(guild, parentMessage, inForum != null && inForum);
const useStateFromStores = FluxModule.useStateFromStores;
if (Reflect.apply(useStateFromStores, FluxModule, [[PermissionStore], function() {
var permissionStoreBinding = PermissionStore;
var VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
return permissionStoreBinding.canWithPartialContext(VIEW_CHANNEL, {channelId: parentMessage.id});
}])) {
if (thread == null) {
return (
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VMWjXW)}
{((ChatIcon) => )((require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon)}
{((ChevronSmallRightIcon) => )((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)}
);
}
if (mostRecentMessage == null) {
return (
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VMWjXW)}
{((ChatIcon) => )((require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon)}
{((ChevronSmallRightIcon) => )((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)}
);
}
r18 = messageCount > 99 ? '99+' : messageCount;
var pressableHighlightProps2 = {style: [value3.comments, style], onPress: onPress};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
items2 = [
,
];
var textProps2 = {'variant': 'text-sm/semibold', 'lineClamp': 1, style: value3.recentCommentText};
if (mostRecentMessage.content.length > 0) {
defaultImport = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
r11 = defaultImport.parseInlineReply(mostRecentMessage.content, true);
} else {
r11 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6kp9H2']);
}
items2[1] = (
{r11}
);
var viewBindingProps = {style: value3.commentCount};
const ChatIcon = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon;
items3 = [
,
];
items3[1] = (
{r18}
);
items3[2] = ((ChevronSmallRightIcon) => )((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon);
items2[2] = (
{items3}
);
return (
{items2}
);
}
return null;
function useThread(a0, a1, a2) { // fn#112275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:10426, owner: ThreadAsComments.useThread, offset: 0x023c2d1a, size: 167 bytes, params: 4, frame: 19
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const {thread, messageCount,
mostRecentMessage} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore,
ThreadMessageStore], function() {
var object = {};
object.thread = ChannelStore.getChannel(require.id);
object.messageCount = ThreadMessageStore.getCount(require.id) ?? 0;
object.mostRecentMessage = ThreadMessageStore.getMostRecentMessage(require.id);
return object;
});
env1_3.useEffect(_fun112277, [a0.id, a2, a1]);
return {thread: thread, messageCount: messageCount, mostRecentMessage: mostRecentMessage};
function _fun112277() { // fn#112277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15051:10708, offset: 0x023c2e2b, size: 178 bytes, params: 1, frame: 17
var id;
var defaultImport;
var preload;
var fetchMessages;
var value;
const hasFlag = require.hasFlag;
const HAS_THREAD = MessageFlags.HAS_THREAD;
if ((Reflect.apply(hasFlag, require,
[HAS_THREAD]) || importDefault) && ThreadMessageStore.getMostRecentMessage(require.id) == null) {
defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
preload = defaultImport.preload;
id = env0_0.id;
Reflect.apply(preload, defaultImport, [id, require.id]);
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
fetchMessages = value.fetchMessages;
id = require.id;
Reflect.apply(fetchMessages, value, [{'channelId': null, 'isPreload': true, 'limit': 25, channelId: id}]);
}
}
}
}
}
global.__d(_fun112249, 14854, [31, 27, 6898, 1379, 1945, 3784, 1878, 661, 33, 7230, 9311, 6697, 9783, 14783, 5097,
6837, 5459, 7067, 4044, 14815, 477, 697, 1305, 7599, 6819, 4584, 5278, 4573, 4788, 14855, 8638, 566, 4617, 9580,
8743, 6704, 9579, 14517, 9133, 1244, 14816, 4048, 3860, 4000, 4017, 4504, 4603, 6682, 6818, 6622,
2]) /* metro module 14854, dependencies: [31, 27, 6898, 1379, 1945, 3784, 1878, 661, 33, 7230, 9311, 6697, 9783, 14783, 5097, 6837, 5459, 7067, 4044, 14815, 477, 697, 1305, 7599, 6819, 4584, 5278, 4573, 4788, 14855, 8638, 566, 4617, 9580, 8743, 6704, 9579, 14517, 9133, 1244, 14816, 4048, 3860, 4000, 4017, 4504, 4603, 6682, 6818, 6622, 2] */;