decord/source/modules/channel/native/ChannelPickerActionSheet.tsx

100 lines
3.6 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 10573
// Function ID: 10574
2026-07-20 16:05:17 +00:00
// Name: ChannelPickerActionSheet
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 4033, 1922, 21, 1629, 7214, 4346, 6987, 8139, 6327, 10574, 7213, 6990, 8140, 6870, 4989, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 10573 (ChannelPickerActionSheet)
import noopAll from "noop" /* 19 */;
import closure_3 from "markAllUserIdListsStale" /* 4033 */;
import closure_4 from "mergeGuildAvatar" /* 1922 */;
import jsxProd from "jsxProd" /* 21 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
noopAll;
2026-07-29 08:29:29 +00:00
({ jsx: c5, jsxs: closure_6 } = jsxProd);
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/channel/native/ChannelPickerActionSheet.tsx");
2026-07-20 16:05:17 +00:00
export default function ChannelPickerActionSheet(noChannelOptionLabel) {
2026-07-23 10:11:24 +00:00
const _require = noChannelOptionLabel;
({ header, guild: importDefault, channels } = noChannelOptionLabel);
2026-08-24 06:08:38 +00:00
({ onSelect: closure_3, selectedChannel } = noChannelOptionLabel);
2026-07-29 08:29:29 +00:00
let tmp3;
2026-07-20 16:05:17 +00:00
if (null != header) {
const onClose = header.onClose;
2026-07-29 08:29:29 +00:00
let tmp4;
2026-07-20 16:05:17 +00:00
if (null != onClose) {
2026-07-29 08:29:29 +00:00
let obj = { onPress: null };
obj[0] = function onPress() {
2026-08-24 06:08:38 +00:00
closure_1_1(channels[6]).hideActionSheet();
2026-07-29 08:29:29 +00:00
onClose();
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
tmp4 = callback(_require(tmp2[5]).ActionSheetCloseButton, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { title: null, trailing: null };
obj[0] = header.title;
obj[1] = tmp4;
tmp3 = callback(_require(tmp2[7]).BottomSheetTitleHeader, obj);
2026-07-20 16:05:17 +00:00
}
let tmp9;
if (null != noChannelOptionLabel.noChannelOptionLabel) {
2026-07-29 08:29:29 +00:00
obj = { value: "", label: null, icon: null };
obj[1] = noChannelOptionLabel.noChannelOptionLabel;
2026-08-24 06:08:38 +00:00
obj1 = { source: null };
2026-07-29 08:29:29 +00:00
obj1[0] = importDefault(tmp2[10]);
obj[2] = callback(_require(tmp2[9]).TableRowIcon, obj1);
tmp9 = callback(_require(tmp2[8]).TableRadioRow, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let obj2 = { scrollable: true, header: tmp3, children: null };
const obj3 = { contentContainerStyle: { paddingBottom: importDefault(channels[4])().bottom }, children: null };
let str;
if (selectedChannel != null) {
str = selectedChannel.id;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (str == null) {
str = "";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj4 = { defaultValue: str, accessibilityLabel: null, onChange: null, hasIcons: true, children: null };
2026-07-20 16:05:17 +00:00
let title;
2026-07-29 08:29:29 +00:00
if (header != null) {
2026-07-20 16:05:17 +00:00
title = header.title;
}
2026-07-29 08:29:29 +00:00
obj4[1] = title;
obj4[2] = function onChange(arg0) {
2026-08-24 06:08:38 +00:00
noChannelOptionLabel = arg0;
2026-07-23 10:11:24 +00:00
if ("" === arg0) {
if (null != noChannelOptionLabel.noChannelOptionLabel) {
2026-08-24 06:08:38 +00:00
closure_1_1(channels[6]).hideActionSheet();
2026-07-29 08:29:29 +00:00
obj.onSelect(null);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = noChannelOptionLabel;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const found = channels.find((id) => id.id === closure_0);
2026-07-20 16:05:17 +00:00
if (null != found) {
2026-08-24 06:08:38 +00:00
closure_1_1(channels[6]).hideActionSheet();
2026-07-23 10:11:24 +00:00
callback(found);
2026-08-24 06:08:38 +00:00
const obj2 = closure_1_1(channels[6]);
2026-07-20 16:05:17 +00:00
}
};
const items = [
tmp9,
channels.map((id) => {
2026-07-23 10:11:24 +00:00
let obj = noChannelOptionLabel(channels[14]);
2026-07-20 16:05:17 +00:00
const channelIconWithGuild = obj.getChannelIconWithGuild(id, closure_1);
2026-08-24 06:08:38 +00:00
obj = { value: id.id, label: noChannelOptionLabel(channels[15]).computeChannelName(id, onClose, closure_1_3), icon: null };
2026-07-29 08:29:29 +00:00
let tmp4Result = null;
2026-07-20 16:05:17 +00:00
if (null != channelIconWithGuild) {
2026-07-29 08:29:29 +00:00
obj = { source: null };
obj[0] = channelIconWithGuild;
tmp4Result = tmp4(noChannelOptionLabel(channels[9]).TableRowIcon, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[2] = tmp4Result;
2026-08-24 06:08:38 +00:00
return closure_1_5(noChannelOptionLabel(channels[8]).TableRadioRow, obj, id.id);
2026-07-20 16:05:17 +00:00
})
];
2026-07-29 08:29:29 +00:00
obj4[4] = items;
obj3[1] = closure_6(_require(channels[13]).TableRadioGroup, obj4);
obj2[2] = callback(_require(channels[12]).BottomSheetScrollView, obj3);
2026-07-23 10:11:24 +00:00
return callback(_require(channels[11]).ActionSheet, obj2);
2026-07-20 16:05:17 +00:00
};