decord/source/modules/hub/native/components/HubSidebar.tsx

120 lines
4.6 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 15569
// Function ID: 15570
2026-07-20 16:05:17 +00:00
// Name: HubItem
2026-08-25 06:04:03 +00:00
// Dependencies: [19, 17, 1982, 1981, 676, 9950, 21, 4380, 712, 11948, 1297, 589, 15570, 15571, 14070, 1236, 4391, 12309, 11875, 4317, 9212, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 15569 (HubItem)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 712 */;
2026-08-25 06:04:03 +00:00
import BaseChannelSubtitle from "BaseChannelSubtitle" /* 11948 */;
import BaseChannelSubtitleDefault from "BaseChannelSubtitle" /* 11948 */;
2026-08-24 06:08:38 +00:00
import { View } from "get ActivityIndicator" /* 17 */;
2026-08-25 06:04:03 +00:00
import closure_4 from "comparator" /* 1982 */;
import closure_5 from "handleConnectionOpen" /* 1981 */;
2026-08-24 06:08:38 +00:00
import { InstantInviteSources } from "ME" /* 676 */;
import jsxProd from "jsxProd" /* 21 */;
2026-08-25 06:04:03 +00:00
import createCacheKey from "createCacheKey" /* 4380 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function HubItem(arg0) {
({ label, unreadCount } = arg0);
({ IconComponent, handleItemClick, active } = arg0);
2026-08-24 06:08:38 +00:00
const ChannelModes = BaseChannelSubtitle.ChannelModes;
2026-07-29 08:29:29 +00:00
if (active) {
let DEFAULT = ChannelModes.SELECTED;
let tmp5 = tmp2;
} else {
DEFAULT = ChannelModes.DEFAULT;
tmp5 = tmp2;
}
2026-08-24 06:08:38 +00:00
let obj = { style: callback2().container, accessibilityLabel: label, accessibilityRole: "menuitem", onPress: handleItemClick, disableHighlightOnPress: true, mode: DEFAULT, name: null, icon: null, channelInfo: null };
const tmp = callback2();
2026-08-25 06:04:03 +00:00
obj[6] = callback(tmp5(11948).BaseChannelName, { name: label, mode: DEFAULT });
obj[7] = callback(tmp5(11948).BaseChannelIcon, { mode: DEFAULT, IconComponent });
2026-07-29 08:29:29 +00:00
let tmp6Result = null;
2026-07-20 16:05:17 +00:00
if (null != unreadCount) {
2026-07-29 08:29:29 +00:00
obj = { value: null };
obj[0] = unreadCount;
tmp6Result = tmp6(tmp5(1297).Badge, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[8] = tmp6Result;
2026-08-24 06:08:38 +00:00
return callback(BaseChannelSubtitleDefault, obj);
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
noopAll;
({ jsx: error, jsxs: closure_8 } = jsxProd);
2026-07-29 08:29:29 +00:00
createCacheKey = { container: null, row: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { marginVertical: require("hairlineWidth").CHANNEL_MARGIN_VERTICAL, marginHorizontal: 8, borderRadius: ThemesDefault.radii.md };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
createCacheKey[1] = { flex: 1 };
2026-08-24 06:08:38 +00:00
let closure_9 = createCacheKey.createStyles(createCacheKey);
let result = require("set").fileFinishedImporting("modules/hub/native/components/HubSidebar.tsx");
2026-07-20 16:05:17 +00:00
export default function HubSidebar(guild) {
guild = guild.guild;
2026-07-29 08:29:29 +00:00
let stateFromStores;
2026-08-24 06:08:38 +00:00
dependencyMap = undefined;
2026-07-29 08:29:29 +00:00
let obj = guild(589);
2026-08-24 06:08:38 +00:00
const items = [closure_4];
2026-07-20 16:05:17 +00:00
const items1 = [guild.id];
2026-08-24 06:08:38 +00:00
stateFromStores = obj.useStateFromStores(items, () => closure_1_4.getDefaultChannel(guild.id), items1);
obj1 = guild(589);
const items2 = [closure_4];
dependencyMap = obj1.useStateFromStoresObject(items2, () => closure_1_4.getChannels(guild.id));
2026-07-29 08:29:29 +00:00
let obj2 = guild(589);
2026-08-24 06:08:38 +00:00
const items3 = [closure_5];
2026-07-20 16:05:17 +00:00
const stateFromStores1 = obj2.useStateFromStores(items3, () => {
2026-07-29 08:29:29 +00:00
let tmp2 = null != stateFromStores;
if (tmp2) {
2026-08-24 06:08:38 +00:00
tmp2 = closure_1_5.getChannelId() === tmp.id;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp2;
2026-07-20 16:05:17 +00:00
});
2026-08-25 06:04:03 +00:00
guild(15570);
2026-07-29 08:29:29 +00:00
let tmp9Result = null;
2026-07-20 16:05:17 +00:00
if (null != stateFromStores) {
let row = null;
if (guild.flashList) {
2026-07-29 08:29:29 +00:00
row = tmp4.row;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { style: null, children: null };
obj[0] = row;
obj = { guild: null };
obj[0] = guild;
2026-08-25 06:04:03 +00:00
const items4 = [callback(stateFromStores(15571), obj), , , ];
2026-07-29 08:29:29 +00:00
obj1 = { active: null, IconComponent: null, label: null, handleItemClick: null, unreadCount: null };
obj1[0] = stateFromStores1;
2026-08-25 06:04:03 +00:00
obj1[1] = tmp(14070).CompassIcon;
2026-07-29 08:29:29 +00:00
const intl = tmp(1236).intl;
obj1[2] = intl.string(tmp(1236).t.K50GHd);
obj1[3] = function handleItemClick() {
2026-08-25 06:04:03 +00:00
guild(4391).transitionToChannel(stateFromStores.id);
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj1[4] = tmp7;
2026-07-20 16:05:17 +00:00
items4[1] = callback(HubItem, obj1);
2026-07-29 08:29:29 +00:00
obj2 = { IconComponent: null, label: null, handleItemClick: null };
2026-08-25 06:04:03 +00:00
obj2[0] = tmp(12309).PlusMediumIcon;
2026-07-29 08:29:29 +00:00
const intl2 = tmp(1236).intl;
obj2[1] = intl2.string(tmp(1236).t.emRpdS);
obj2[2] = function handleItemClick() {
2026-08-25 06:04:03 +00:00
let obj = stateFromStores(11875);
2026-07-20 16:05:17 +00:00
obj = { directoryGuildName: guild.name, directoryGuildId: guild.id, directoryChannelId: stateFromStores.id };
return obj.open(obj);
};
items4[2] = callback(HubItem, obj2);
2026-07-29 08:29:29 +00:00
const obj3 = { IconComponent: null, label: null, handleItemClick: null };
2026-08-25 06:04:03 +00:00
obj3[0] = tmp(4317).UserPlusIcon;
2026-07-29 08:29:29 +00:00
const intl3 = tmp(1236).intl;
obj3[1] = intl3.string(tmp(1236).t.MJQOuJ);
obj3[2] = function handleItemClick() {
2026-08-25 06:04:03 +00:00
const result = guild(9212).handleOpenInviteActionsheet(guild, stateFromStores.id, dependencyMap, closure_1_6.GUILD_HEADER);
2026-07-20 16:05:17 +00:00
};
items4[3] = callback(HubItem, obj3);
2026-07-29 08:29:29 +00:00
obj[1] = items4;
tmp9Result = closure_8(View, obj);
const tmp10 = View;
const tmp9 = closure_8;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp9Result;
2026-07-20 16:05:17 +00:00
};