// Module ID: 16765 // Function ID: 16766 // Name: VibegrationsRepliedMessage // Dependencies: [19, 17, 21, 16763, 4638, 576, 16766, 4482, 1115, 3591, 1177, 4634, 2] // Exports: default // Module 16765 (VibegrationsRepliedMessage) import nativeDefault from "native" /* 576 */; import _modDef3591 from "module_3591" /* 3591 */; import UserUtils from "UserUtils" /* 4482 */; import Text_Text from "Text/Text" /* 4634 */; import VibegrationsMessageAuthor from "VibegrationsMessageAuthor" /* 16766 */; import noop from "module_19" /* 19 */; require = fn; get_ActivityIndicator = fn(17); ({ Pressable: c3, View: closure_4 } = get_ActivityIndicator); const jsxProd = fn(21); ({ jsx: hasOwnProperty, jsxs: metroRequire } = jsxProd); const diff = fn(16763).MESSAGE_EDGE_INSET + fn(16763).MESSAGE_AVATAR_SIZE / 2 - 1; const diff1 = fn(16763).MESSAGE_CONTENT_INSET - 4 - diff; const createStyles = fn(4638); let obj2 = { root: { marginLeft: diff - fn(16763).MESSAGE_CONTENT_INSET, paddingLeft: diff1 + 4, height: 20, flexDirection: "row", alignItems: "flex-start" }, spine: null, avatar: null, name: null, content: null }; const rect = { position: "absolute", left: 0, top: 9, bottom: 0, width: diff1, borderTopWidth: 2, borderLeftWidth: 2, borderColor: nativeDefault.colors.SPINE_DEFAULT, borderTopLeftRadius: Math.round(0.25 * diff1) }; obj2.spine = rect; obj2.avatar = { marginRight: 4 }; obj2.name = { flexShrink: 0, marginRight: 4, maxWidth: "40%" }; obj2.content = { flex: 1 }; let closure_7 = createStyles.createStyles(obj2); const size = fn(2); const result = size.fileFinishedImporting("modules/vibegrations/native/VibegrationsRepliedMessage.tsx"); export default function VibegrationsRepliedMessage(arg0) { ({ replied, onJump } = arg0); const tmp = closure_7(); const messageAuthorUser = VibegrationsMessageAuthor.useMessageAuthorUser(replied.userId); let str = UserUtils.useName(messageAuthorUser); if (str == null) { str = ""; } const trimmed = replied.content.replace(/\s+/g, " ").trim(); const obj3 = { style: tmp.root, onPress: onJump, disabled: null == onJump, accessibilityRole: "button", accessibilityLabel: null, children: null }; const intl = tmp2(1115).intl; obj3.accessibilityLabel = intl.formatToPlainString(_modDef3591.loFt7s, { name: str, content: trimmed }); const items = [hasOwnProperty(React4, { style: tmp.spine }), , , ]; let tmp8Result = null; if (null != messageAuthorUser) { const obj5 = { style: tmp.avatar, children: null }; const obj6 = { userId: replied.userId, size: tmp2(1177).AvatarSizes.SIZE_16 }; obj5.children = tmp8(tmp2(16766).VibegrationsUserAvatar, obj6); tmp8Result = tmp8(React4, obj5); } items[1] = tmp8Result; items[2] = hasOwnProperty(Text_Text.Text, { variant: "text-xs/semibold", color: "text-default", style: tmp.name, lineClamp: 1, children: str }); items[3] = hasOwnProperty(Text_Text.Text, { variant: "text-xs/medium", color: "interactive-text-default", style: tmp.content, lineClamp: 1, children: trimmed }); obj3.children = items; return timestampProducer(React3, obj3); }; export const REPLY_PREVIEW_HEIGHT = 20;