decord/source/modules/user_profile/native/UserProfileCustomStatusActionSheet.tsx
github-actions ecf26fc058 chore: update source for alpha 347.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
2026-09-16 07:03:15 +00:00

64 lines
3.3 KiB
TypeScript

// Module ID: 11302
// Function ID: 11303
// Name: UserProfileCustomStatusActionSheet
// Dependencies: [19, 17, 1372, 7318, 21, 4638, 576, 504, 11303, 4790, 1115, 11304, 8385, 11265, 2]
// Exports: default
// Module 11302 (UserProfileCustomStatusActionSheet)
import nativeDefault from "native" /* 576 */;
import NicknameUtilsDefault from "NicknameUtils" /* 4790 */;
import HeaderAvatarDefault from "HeaderAvatar" /* 8385 */;
import UserProfileCustomStatusBubbleDefault from "UserProfileCustomStatusBubble" /* 11265 */;
import useCustomStatusActivityForUserDefault from "useCustomStatusActivityForUser" /* 11303 */;
import UserProfileStackedActionSheetDefault from "UserProfileStackedActionSheet" /* 11304 */;
import noop from "module_19" /* 19 */;
import UserStore from "UserStore" /* 1372 */;
const require = fn;
const View = fn(17).View;
const Constants = fn(7318);
({ AVATAR_CONTAINER_SIZE, AVATAR_CUSTOM_STATUS_GAP } = Constants);
const jsxProd = fn(21);
({ jsx: hasOwnProperty, jsxs: metroRequire } = jsxProd);
const createStyles = fn(4638);
let obj2 = { statusPreviewContainer: { flexDirection: "row", columnGap: AVATAR_CUSTOM_STATUS_GAP, marginHorizontal: nativeDefault.space.PX_16 }, avatarContainer: { height: AVATAR_CONTAINER_SIZE, width: AVATAR_CONTAINER_SIZE, alignItems: "center", justifyContent: "center" }, avatarStatus: null, customStatusBubble: null };
let obj3 = { flexDirection: "row", columnGap: AVATAR_CUSTOM_STATUS_GAP, marginHorizontal: nativeDefault.space.PX_16 };
obj2.avatarStatus = { backgroundColor: nativeDefault.colors.MOBILE_ACTIONSHEET_BACKGROUND };
obj2.customStatusBubble = { marginTop: AVATAR_CONTAINER_SIZE / 2 + 10, flexShrink: 1, flexGrow: 1 };
let closure_7 = createStyles.createStyles(obj2);
const size = fn(2);
const result = size.fileFinishedImporting("modules/user_profile/native/UserProfileCustomStatusActionSheet.tsx");
export default function UserProfileCustomStatusActionSheet(user) {
user = user.user;
({ guildId, channelId, previewEmoji, previewText } = user);
const tmp = closure_7();
const items = [UserStore];
const items1 = [user];
const stateFromStores = user(504).useStateFromStores(items, () => {
const currentUser = UserStore.getCurrentUser();
let id;
if (currentUser != null) {
id = currentUser.id;
}
return id === user.id;
}, items1);
const obj = user(504);
const tmp6 = useCustomStatusActivityForUserDefault(user.id);
const name = NicknameUtilsDefault.useName(guildId, channelId, user);
const intl = user(1115).intl;
if (stateFromStores) {
let stringResult = intl.string(tmp2(1115).t.AHoLf4);
} else {
const obj3 = { username: name };
stringResult = intl.formatToPlainString(tmp2(1115).t["pP5Aa+"], obj3);
}
const obj4 = { title: stringResult, children: null };
const obj5 = { style: tmp.statusPreviewContainer, children: null };
const obj6 = { style: tmp.avatarContainer, children: null };
obj6.children = closure_5(HeaderAvatarDefault, { user, statusStyle: tmp.avatarStatus });
const items2 = [closure_5(View, obj6), closure_5(UserProfileCustomStatusBubbleDefault, { customStatusActivity: tmp6, hasCustomProfileTheme: false, showFullStatus: true, style: tmp.customStatusBubble, previewEmoji, previewText })];
obj5.children = items2;
obj4.children = closure_6(View, obj5);
return closure_5(UserProfileStackedActionSheetDefault, obj4);
};