decord/source/modules/user_profile/native/UserProfileActivityVoiceChannel.tsx

149 lines
6.2 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 11950
// Function ID: 92400
2026-07-20 16:05:17 +00:00
// Name: UserProfileActivityVoiceChannel
2026-07-27 11:26:19 +00:00
// Dependencies: [27, 3759, 482, 33, 4131, 477, 5462, 8045, 4529, 11951, 4321, 566, 4655, 4659, 1212, 5513, 4661, 3832, 5512, 4127, 8254, 4342, 4099, 11952, 1935, 8297, 11953, 1273, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-27 11:26:19 +00:00
// Module 11950 (UserProfileActivityVoiceChannel)
2026-07-23 10:11:24 +00:00
import { View } from "Button";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import { Permissions } from "sum";
import jsxProd from "jsxProd";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
import set from "set";
import set from "sum";
let closure_6;
let closure_7;
({ jsx: closure_6, jsxs: closure_7 } = jsxProd);
let obj = { container: { flexDirection: "row", alignItems: "center", gap: 4, overflow: "hidden" }, channelButton: { flex: 1, flexDirection: "row", alignItems: "center", gap: 2 } };
obj = { flex: 1, overflow: "hidden" };
2026-07-20 16:05:17 +00:00
let num = -1;
2026-07-23 10:11:24 +00:00
if (set.isAndroid()) {
2026-07-20 16:05:17 +00:00
num = -2;
}
obj.marginTop = num;
obj.channelName = obj;
2026-07-23 10:11:24 +00:00
let closure_8 = _createForOfIteratorHelperLoose.createStyles(obj);
const result = set.fileFinishedImporting("modules/user_profile/native/UserProfileActivityVoiceChannel.tsx");
2026-07-20 16:05:17 +00:00
export default function UserProfileActivityVoiceChannel(guild) {
guild = guild.guild;
const channel = guild.channel;
2026-07-23 10:11:24 +00:00
const onAction = guild.onAction;
2026-07-20 16:05:17 +00:00
const tmp = callback2();
2026-07-23 10:11:24 +00:00
const newestAnalyticsLocation = channel(onAction[6])().newestAnalyticsLocation;
let obj = guild(onAction[7]);
2026-07-20 16:05:17 +00:00
const context = obj.useUserProfileAnalyticsContext().context;
2026-07-23 10:11:24 +00:00
let obj1 = guild(onAction[8]);
2026-07-20 16:05:17 +00:00
const isScreenReaderEnabled = obj1.useIsScreenReaderEnabled();
2026-07-23 10:11:24 +00:00
const arr = channel(onAction[9])(channel);
const tmp3 = channel(onAction[10])(channel);
let obj2 = guild(onAction[11]);
2026-07-20 16:05:17 +00:00
const items = [context];
const stateFromStores = obj2.useStateFromStores(items, () => {
let isPrivateResult = channel.isPrivate();
if (!isPrivateResult) {
isPrivateResult = context.can(arr.CONNECT, channel);
}
return isPrivateResult;
});
if (channel.isGuildStageVoice()) {
let VoiceNormalIcon = tmp5(tmp6[12]).StageIcon;
} else {
VoiceNormalIcon = tmp5(tmp6[13]).VoiceNormalIcon;
}
obj = { style: items1 };
2026-07-23 10:11:24 +00:00
items1 = [tmp.container, guild.style];
2026-07-20 16:05:17 +00:00
if (isScreenReaderEnabled) {
obj = { accessible: true };
2026-07-23 10:11:24 +00:00
const intl = guild(onAction[14]).intl;
2026-07-20 16:05:17 +00:00
obj1 = { guildName: guild.name };
2026-07-23 10:11:24 +00:00
obj.accessibilityLabel = intl.formatToPlainString(guild(onAction[14]).t.xm6W9D, obj1);
obj2 = { size: guild(onAction[15]).GuildIconSizes.XXSMALL, guild };
obj.children = tmp9(channel(onAction[15]), obj2);
let tmp9Result = tmp9(newestAnalyticsLocation, obj);
const tmp19 = channel(onAction[15]);
2026-07-20 16:05:17 +00:00
} else {
const obj3 = {
accessibilityRole: "button",
accessibilityLabel: guild.name,
onPress() {
onAction({ action: "PRESS_VOICE_CHANNEL_ICON" });
let obj = channel(onAction[17]);
obj = {
key: "GUILD_NAME_TOAST",
content: guild.name,
icon() {
2026-07-23 10:11:24 +00:00
const obj = { size: guild(onAction[15]).GuildIconSizes.XSMALL, guild: outer1_0 };
return outer2_6(channel(onAction[15]), obj);
2026-07-20 16:05:17 +00:00
}
};
obj.open(obj);
}
};
2026-07-23 10:11:24 +00:00
const obj4 = { size: guild(onAction[15]).GuildIconSizes.XXSMALL, guild };
obj3.children = tmp9(channel(onAction[15]), obj4);
tmp9Result = tmp9(guild(onAction[16]).PressableOpacity, obj3);
const tmp13 = channel(onAction[15]);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const items2 = [tmp9Result, callback(guild(onAction[18]).ChevronSmallRightIcon, { size: "xxs", color: "text-default" }), , ];
2026-07-20 16:05:17 +00:00
if (stateFromStores) {
const obj5 = { style: tmp.channelButton, accessibilityRole: "button" };
const obj6 = { channel };
2026-07-23 10:11:24 +00:00
obj5.accessibilityLabel = channel(onAction[20])(obj6);
const intl2 = guild(onAction[14]).intl;
obj5.accessibilityHint = intl2.string(guild(onAction[14]).t["9C444m"]);
2026-07-20 16:05:17 +00:00
obj5.onPress = function onPress() {
onAction({ action: "OPEN_VOICE_CHANNEL" });
guild(onAction[21]).openGuildVoiceModal(channel, newestAnalyticsLocation);
const obj = guild(onAction[21]);
channel(onAction[22]).hideActionSheet();
};
2026-07-23 10:11:24 +00:00
const items3 = [callback(VoiceNormalIcon, { size: "xxs", color: "text-default" }), ];
const obj7 = { style: tmp.channelName, variant: "text-xs/normal", lineClamp: 1, children: tmp3 };
items3[1] = callback(guild(onAction[19]).Text, obj7);
2026-07-20 16:05:17 +00:00
obj5.children = items3;
2026-07-23 10:11:24 +00:00
let tmp20Result = tmp20(guild(onAction[16]).PressableOpacity, obj5);
2026-07-20 16:05:17 +00:00
} else {
const obj8 = { style: tmp.channelButton };
2026-07-23 10:11:24 +00:00
const items4 = [callback(VoiceNormalIcon, { size: "xxs", color: "text-default" }), ];
const obj9 = { style: tmp.channelName, variant: "text-xs/normal", lineClamp: 1, children: tmp3 };
items4[1] = callback(guild(onAction[19]).Text, obj9);
2026-07-20 16:05:17 +00:00
obj8.children = items4;
2026-07-23 10:11:24 +00:00
tmp20Result = tmp20(newestAnalyticsLocation, obj8);
2026-07-20 16:05:17 +00:00
}
items2[2] = tmp20Result;
const obj10 = { accessibilityRole: "button" };
2026-07-23 10:11:24 +00:00
const intl3 = guild(onAction[14]).intl;
obj10.accessibilityLabel = intl3.formatToPlainString(guild(onAction[14]).t.e95u3C, { count: arr.length });
2026-07-20 16:05:17 +00:00
obj10.onPress = function onPress() {
onAction({ action: "PRESS_VOICE_CHANNEL_AVATARS" });
let obj = channel(onAction[22]);
obj = {
users: arr,
channel,
onPressUser(arg0) {
const obj = {};
2026-07-23 10:11:24 +00:00
const merged = Object.assign(outer1_4);
2026-07-20 16:05:17 +00:00
obj["userId"] = arg0;
2026-07-23 10:11:24 +00:00
return channel(onAction[25])(obj);
2026-07-20 16:05:17 +00:00
}
};
obj.openLazy(guild(onAction[24])(onAction[23], onAction.paths), "UserProfileActivityVoiceChannelUsers", obj, "stack");
};
2026-07-23 10:11:24 +00:00
const obj12 = { size: guild(onAction[27]).AvatarSizes.SIZE_16, totalCount: arr.length, names: arr.map((username) => username.username) };
2026-07-20 16:05:17 +00:00
let substr = arr;
if (arr.length > 3) {
substr = arr.slice(0, 3);
}
obj12.children = substr.map((user) => {
const obj = { size: guild(onAction[27]).AvatarSizes.SIZE_16, channel, guildId: guild.id, user };
2026-07-23 10:11:24 +00:00
return outer1_6(guild(onAction[27]).Avatar, obj, user.id);
2026-07-20 16:05:17 +00:00
});
2026-07-23 10:11:24 +00:00
obj10.children = callback(guild(onAction[26]).AvatarPile, obj12);
items2[3] = callback(guild(onAction[16]).PressableOpacity, obj10);
2026-07-20 16:05:17 +00:00
obj.children = items2;
2026-07-23 10:11:24 +00:00
return closure_7(newestAnalyticsLocation, obj);
2026-07-20 16:05:17 +00:00
};