decord/source/modules/people/native/FriendRequestNote.tsx

99 lines
4.1 KiB
TypeScript
Raw Normal View History

// Module ID: 13270
// Function ID: 13271
2026-07-20 16:05:17 +00:00
// Name: FriendRequestNote
// Dependencies: [32, 19, 17, 4286, 1074, 21, 4638, 576, 13271, 504, 13272, 4634, 5060, 7078, 1115, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 13270 (FriendRequestNote)
import nativeDefault from "native" /* 576 */;
import PeopleListTracking from "PeopleListTracking" /* 13272 */;
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
import RelationshipStore from "RelationshipStore" /* 4286 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
require = fn;
get_ActivityIndicator = fn(17);
({ Pressable: closure_4, View: hasOwnProperty } = get_ActivityIndicator);
const RelationshipTypes = fn(1074).RelationshipTypes;
const jsxProd = fn(21);
({ jsx: closure_8, jsxs: closure_9 } = jsxProd);
const createStyles = fn(4638);
let obj2 = { container: { width: "100%", position: "relative", padding: nativeDefault.space.PX_12, borderRadius: nativeDefault.radii.md, minHeight: 56, flexDirection: "row", alignItems: "center" }, spoiler: null, hidden: null };
const rect = { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, justifyContent: "center", alignItems: "center", borderRadius: nativeDefault.radii.md };
obj2.spoiler = rect;
obj2.hidden = { opacity: 0 };
let closure_10 = createStyles.createStyles(obj2);
const size = fn(2);
let result = size.fileFinishedImporting("modules/people/native/FriendRequestNote.tsx");
2026-07-20 16:05:17 +00:00
export default function FriendRequestNote(styles) {
2026-07-23 10:11:24 +00:00
({ userId: require, backgroundColor, analyticsLocation } = styles);
noop = undefined;
const tmp = closure_10();
const hideFriendRequestNotes = require("HideFriendRequestNotesUtils").useHideFriendRequestNotes();
const obj = require("HideFriendRequestNotesUtils");
const items = [RelationshipStore];
const stateFromStoresObject = require("initialize").useStateFromStoresObject(items, () => ({ note: RelationshipStore.getNote(require), type: RelationshipStore.getRelationshipType(require) }));
const note = stateFromStoresObject.note;
let obj2 = require("initialize");
[tmp7, c3] = note(noop.useState(stateFromStoresObject.type === RelationshipTypes.PENDING_OUTGOING), 2);
2026-07-20 16:05:17 +00:00
const items1 = [analyticsLocation, note];
const callback = noop.useCallback(() => {
2026-07-29 08:29:29 +00:00
_undefined(true);
const obj2 = { analyticsLocation, noteLength: null };
2026-07-29 08:29:29 +00:00
let num;
if (note != null) {
num = note.length;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (num == null) {
num = 0;
2026-07-20 16:05:17 +00:00
}
obj2.noteLength = num;
const result = PeopleListTracking.trackViewFriendRequestNote(obj2);
2026-07-20 16:05:17 +00:00
}, items1);
2026-07-29 08:29:29 +00:00
let tmp13Result = null;
2026-08-31 15:47:37 +00:00
if (!hideFriendRequestNotes) {
2026-07-29 08:29:29 +00:00
tmp13Result = null;
2026-07-20 16:05:17 +00:00
if (null != note) {
2026-07-29 08:29:29 +00:00
tmp13Result = null;
2026-07-20 16:05:17 +00:00
if ("" !== note) {
const obj3 = { style: null, onPress: null, children: null };
2026-07-20 16:05:17 +00:00
const items2 = [tmp.container, styles.styles];
obj3.style = items2;
obj3.onPress = callback;
2026-07-20 16:05:17 +00:00
let hidden;
2026-07-29 08:29:29 +00:00
if (!tmp7) {
2026-07-20 16:05:17 +00:00
hidden = tmp.hidden;
}
const obj4 = { style: hidden, children: null };
const obj5 = { accessible: tmp7, accessibilityElementsHidden: !tmp7, accessibilityLabel: str, variant: "redesign/message-preview/normal", children: note };
obj4.children = closure_8(tmp2(tmp3[11]).Text, obj5);
const items3 = [closure_8(closure_5, obj4), ];
2026-07-29 08:29:29 +00:00
let tmp15Result = null;
if (!tmp7) {
2026-07-20 16:05:17 +00:00
const items4 = [tmp.spoiler, ];
2026-07-29 08:29:29 +00:00
let tmp12;
2026-07-20 16:05:17 +00:00
if (null != backgroundColor) {
const obj6 = { backgroundColor };
tmp12 = obj6;
2026-07-20 16:05:17 +00:00
}
const obj7 = { style: null, children: null };
2026-07-29 08:29:29 +00:00
items4[1] = tmp12;
obj7.style = items4;
const obj8 = { icon: tmp15(tmp2(tmp3[13]).EyeIcon, { size: "sm" }), variant: "secondary", size: "sm", onPress: callback, text: null };
2026-07-29 08:29:29 +00:00
const intl = tmp2(tmp3[14]).intl;
obj8.text = intl.string(tmp2(tmp3[14]).t.sB0q4C);
obj7.children = tmp15(tmp2(tmp3[12]).Button, obj8);
tmp15Result = tmp15(tmp16, obj7);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items3[1] = tmp15Result;
obj3.children = items3;
tmp13Result = closure_9(closure_4, obj3);
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-29 08:29:29 +00:00
return tmp13Result;
2026-07-20 16:05:17 +00:00
};