/* Metro module 14856; source: modules/icymi/native/ICYMICardInCard.tsx; dependencies: [31, 27, 1379, 1945, 1867, 661, 33, 14815, 697, 7599, 6819, 1305, 4584, 566, 4635, 8699, 4617, 4573, 4805, 14857, 1244, 6691, 14855, 5278, 4788, 8638, 2] */ function _fun112281(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:6, offset: 0x023c303b, size: 308 bytes, params: 8, frame: 19 const env0_0 = require; const truncateUsername_112282 = 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 Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importAll(31) /* metro dependency 31 */; const env0_4 = (require(27) /* metro dependency 27 */).View; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */; const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */; const env0_8 = (require(661) /* metro dependency 661: Constants */).DEFAULT_ROLE_COLOR_HEX; let value = require(33) /* metro dependency 33 */; const env0_9 = value.jsx; const env0_10 = value.jsxs; const env0_11 = value.Fragment; const env0_12 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(_fun112284); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMICardInCard.tsx'); exports.default = ICYMICardInCard; } function CutoutGuildIconWithUserCustom({guild, author}) { // fn#112283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:1518, offset: 0x023c316f, size: 311 bytes, params: 2, frame: 27 const value2 = env0_12(); const ClipView = importDefault(7599) /* metro dependency 7599: ClipView */; const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape; const Circle = CutoutShape.Circle; const items2 = [{'shape': null, 'x': 18, 'y': 18, 'size': 24, shape: Circle}]; const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */; const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes; const SMALL_32 = GuildIconSizes.SMALL_32; const clipView = ; const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar; const authorAvatar = value2.authorAvatar; const id = guild.id; const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes; const XSMALL_20 = AvatarSizes.XSMALL_20; return ( {clipView} ); } function _fun112284(a0) { // fn#112284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:329, offset: 0x023c32a6, size: 476 bytes, params: 2, frame: 17 const object2 = {}; object2.container = {marginTop: a0.margin}; object2.content = {'flex': 1, 'overflow': 'hidden'}; let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4; object2.channelNameAndAccessory = {'flexDirection': 'row', 'justifyContent': 'space-between', 'alignItems': 'center', paddingBottom: PX_4, marginHorizontal: a0.margin}; PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4; object2.channelNameAndAccessoryLarge = {flexDirection: 'column', paddingBottom: PX_4, marginHorizontal: a0.margin}; object2.header = {'flexDirection': 'row', 'flexGrow': 1}; const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12; object2.headerInfo = {'flexGrow': 1, 'flexShrink': 1, marginLeft: PX_12}; object2.title = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between', 'marginBottom': 2}; object2.titleLeft = {'flexShrink': 1, 'flexGrow': 0, 'flexDirection': 'row', 'alignItems': 'center', 'gap': 6}; const object3 = {'flexDirection': 'row', 'justifyContent': 'space-between'}; object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object2.subTitleContainer = object3; object2.subtitle = {'flexShrink': 1, 'flexGrow': 0, 'width': '100%'}; object2.genContentSubtitle = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 2}; object2.genContentSubtitleChannel = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 2, 'flex': 1}; object2.subtitleTrailing = {paddingVertical: 1}; const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE; object2.separator = {'height': 1, 'width': '100%', backgroundColor: BORDER_SUBTLE}; const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG; object2.normalContent = {'borderBottomWidth': 1, 'borderBottomColor': null, 'flexShrink': 0, borderBottomColor: BORDER_STRONG}; object2.authorAvatar = {'position': 'absolute', 'right': 0, 'bottom': 0}; return object2; } function ICYMICardInCard({children, message, actionLabel, timestamp, id, interactionType, onHeaderPress, onHeaderLongPress, channelId, guildId, hideTimestamp, shouldFeatureUser}) { // fn#112285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:1978, offset: 0x023c3482, size: 1496 bytes, params: 2, frame: 48 const env0_3 = interactionType; hideTimestamp = !(hideTimestamp === undefined) && hideTimestamp; shouldFeatureUser = !(shouldFeatureUser === undefined) && shouldFeatureUser; const value5 = undefined(); const value6 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale(); const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() { return ChannelStore.getChannel(channelId); }, [channelId]); const r21 = value7?.guild_id ?? guildId; const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun112287, [r21]); const value10 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun112288, [shouldFeatureUser, r21, message]); const value12 = (require(8699) /* metro dependency 8699: useDisplayNameStylesFont */).useDisplayNameStylesFont({displayNameStyles: (importDefault(4635) /* metro dependency 4635: useDisplayNameStyles */)({userId: message == null || message.author == null ? undefined : message.author.id})}); const nicknameUtilsModule = require(4617) /* metro dependency 4617: NicknameUtils */; const useName = nicknameUtilsModule.useName; const r19 = shouldFeatureUser && (message?.author != null && r21 != null) && value7 != null ? Reflect.apply(useName, nicknameUtilsModule, [r21, value7?.id, message?.author]) : null; let binding = env0_3; const value14 = binding.useMemo(_fun112289, [value9, shouldFeatureUser, message?.author]); binding = env0_3; const value15 = binding.useMemo(_fun112290, [value9]); const value17 = binding.useMemo(_fun112291, [shouldFeatureUser, message?.author, r21, value7, (importDefault(4805) /* metro dependency 4805: useChannelName */)(value7), r19, value10, value12, value5.genContentSubtitle, value5.genContentSubtitleChannel, onHeaderPress, actionLabel]); binding = env0_3; const value18 = binding.useCallback(_fun112292, [value9, value7, id, interactionType]); const value19 = binding.useMemo(_fun112293, [value6, value5.channelNameAndAccessoryLarge, value5.channelNameAndAccessory]); const container = value5.container; const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight; const content = value5.content; const header = value5.header; const headerInfo = value5.headerInfo; const title = value5.title; const view = {value15}{!hideTimestamp && ((Text) => {(require(4788) /* metro dependency 4788: NotificationCenterUtils */).getRelativeTimestamp(timestamp)})((require(4573) /* metro dependency 4573: Text */).Text)}; const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity; const subtitleTrailing = value5.subtitleTrailing; const MoreHorizontalIcon = (require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon; const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED; return ( {value14} {view} {value17} {children} ); } function _fun112287() { // fn#112287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:2354, offset: 0x023c3a74, size: 40 bytes, params: 1, frame: 12 const value2 = null; return value2 != env0_10 ? GuildStore.getGuild(env0_10) : value2; } function _fun112288() { // fn#112288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:2426, offset: 0x023c3a9c, size: 104 bytes, params: 1, frame: 14 const shouldFeatureUserBinding = shouldFeatureUser; const value2 = null; return shouldFeatureUserBinding && value2 != env0_10 && value2 != (value2 == message ? undefined : message.author.id) ? GuildMemberStore.getMember(env0_10, message.author.id) : value2; } function _fun112289() { // fn#112289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:2780, offset: 0x023c3b04, size: 180 bytes, params: 1, frame: 20 const value2 = null; return value2 == env0_11 ? value2 : shouldFeatureUser && value2 != (value2 == message ? undefined : message.author) ? : ((Component) => )(importDefault(6819) /* metro dependency 6819: GuildIcon */); } function _fun112290() { // fn#112290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:2994, offset: 0x023c3bb8, size: 111 bytes, params: 1, frame: 18 const value2 = null; if (value2 != env0_11) { const Text = (require(4573) /* metro dependency 4573: Text */).Text; return ( {env0_11.name} ); } else { return value2; } } function _fun112291() { // fn#112291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:3180, offset: 0x023c3c27, size: 1014 bytes, params: 1, frame: 32 var r22; var r6; var r7; var messageBinding; var value2; var value3; var value7; const Text = (require(4573) /* metro dependency 4573: Text */).Text; var items4; var jsxRuntimeEnv1_11Binding; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; var items2; var items3; var value12; var iconForChannel; var items5; var items6; if (shouldFeatureUser) { messageBinding = message; value2 = undefined; if ((messageBinding == null ? value2 : message.author) == null) { value3 = null; r22 = value3 != env0_9 ? (require(14857) /* metro dependency 14857: getIconForChannel */).getIconForChannel(env0_9) : (require(6691) /* metro dependency 6691: TextIcon */).TextIcon; value7 = environment.__proto__; var viewBindingProps = {style: env0_7.genContentSubtitle}; items4 = [{actionLabel}]; if (value3 != env0_9) { jsxRuntimeEnv1_11Binding = jsxRuntimeEnv1_11; items2 = [{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CHUAYk)}]; var viewBinding2Props = {style: env0_7.genContentSubtitleChannel}; items3 = [((Component) => )(r22)]; items3[1] = {env0_15}; items2[1] = {items3}; r6 = <>{items2}; } else { r6 = value3; } items4[1] = r6; return ( {items4} ); } if (env0_10 == null) { value3 = null; r22 = value3 != env0_9 ? (require(14857) /* metro dependency 14857: getIconForChannel */).getIconForChannel(env0_9) : (require(6691) /* metro dependency 6691: TextIcon */).TextIcon; value7 = environment.__proto__; var viewBindingProps = {style: env0_7.genContentSubtitle}; items4 = [{actionLabel}]; if (value3 != env0_9) { jsxRuntimeEnv1_11Binding = jsxRuntimeEnv1_11; items2 = [{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CHUAYk)}]; var viewBinding2Props = {style: env0_7.genContentSubtitleChannel}; items3 = [((Component) => )(r22)]; items3[1] = {env0_15}; items2[1] = {items3}; r6 = <>{items2}; } else { r6 = value3; } items4[1] = r6; return ( {items4} ); } if (env0_9 == null) { value3 = null; r22 = value3 != env0_9 ? (require(14857) /* metro dependency 14857: getIconForChannel */).getIconForChannel(env0_9) : (require(6691) /* metro dependency 6691: TextIcon */).TextIcon; value7 = environment.__proto__; var viewBindingProps = {style: env0_7.genContentSubtitle}; items4 = [{actionLabel}]; if (value3 != env0_9) { jsxRuntimeEnv1_11Binding = jsxRuntimeEnv1_11; items2 = [{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CHUAYk)}]; var viewBinding2Props = {style: env0_7.genContentSubtitleChannel}; items3 = [((Component) => )(r22)]; items3[1] = {env0_15}; items2[1] = {items3}; r6 = <>{items2}; } else { r6 = value3; } items4[1] = r6; return ( {items4} ); } if (env0_14 != null) { r7 = (env0_12 == null ? value2 : env0_12.colorString) ?? DEFAULT_ROLE_COLOR_HEX; value12 = environment.__proto__; iconForChannel = (require(14857) /* metro dependency 14857: getIconForChannel */).getIconForChannel(env0_9); var viewBindingProps = {style: env0_7.genContentSubtitle}; items5 = [{truncateUsername_112282(env0_14)}]; items5[1] = {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CHUAYk)}; var viewBinding3Props = {style: env0_7.genContentSubtitleChannel}; items6 = [((Component) => )(iconForChannel)]; items6[1] = {env0_15}; items5[2] = {items6}; return ( {items5} ); } value3 = null; r22 = value3 != env0_9 ? (require(14857) /* metro dependency 14857: getIconForChannel */).getIconForChannel(env0_9) : (require(6691) /* metro dependency 6691: TextIcon */).TextIcon; value7 = environment.__proto__; var viewBindingProps2 = {style: env0_7.genContentSubtitle}; items4 = [{actionLabel}]; if (value3 != env0_9) { jsxRuntimeEnv1_11Binding = jsxRuntimeEnv1_11; items2 = [{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CHUAYk)}]; var viewBinding2Props = {style: env0_7.genContentSubtitleChannel}; items3 = [((Component) => )(r22)]; items3[1] = {env0_15}; items2[1] = {items3}; r6 = <>{items2}; } else { r6 = value3; } items4[1] = r6; return ( {items4} ); } value3 = null; r22 = value3 != env0_9 ? (require(14857) /* metro dependency 14857: getIconForChannel */).getIconForChannel(env0_9) : (require(6691) /* metro dependency 6691: TextIcon */).TextIcon; const genContentSubtitle = env0_7.genContentSubtitle; const text = {actionLabel}; if (value3 != env0_9) { jsxRuntimeEnv1_11Binding = jsxRuntimeEnv1_11; items2 = [{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CHUAYk)}]; var viewBinding2Props = {style: env0_7.genContentSubtitleChannel}; items3 = [((Component) => )(r22)]; items3[1] = {env0_15}; items2[1] = {items3}; r6 = <>{items2}; } else { r6 = value3; } return ( {text} {r6} ); } function _fun112292() { // fn#112292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:4519, offset: 0x023c401d, size: 111 bytes, params: 1, frame: 13 var value4; if (env0_11 != null && env0_9 != null) { value4 = environment.__proto__; (require(14855) /* metro dependency 14855: openDetailsActionSheet */).openDetailsActionSheet({guildId: env0_11.id, channelId: env0_9.id, id: id, type: interactionType}); } } function _fun112293() { // fn#112293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15053:4643, offset: 0x023c408c, size: 45 bytes, params: 1, frame: 3 return env0_8 > 1.8 ? env0_7.channelNameAndAccessoryLarge : env0_7.channelNameAndAccessory; }