decord/stable/source/modules/channel/native/openChannelPicker.tsx
2026-10-06 22:12:49 +00:00

48 lines
1.7 KiB
TypeScript

// Module ID: 11847
// Function ID: 11848
// Name: openChannelPicker
// Dependencies: [4470, 2073, 4801, 11848, 1987, 1127, 2]
// Exports: default
// Module 11847 (openChannelPicker)
import intl2 from "intl" /* 1127 */;
import asyncRequire from "asyncRequire" /* 1987 */;
import ActionSheetActionCreatorsDefault from "ActionSheetActionCreators" /* 4801 */;
import GuildChannelStore from "GuildChannelStore" /* 4470 */;
import GuildStore from "GuildStore" /* 2073 */;
import size from "module_2" /* 2 */;
const result = size.fileFinishedImporting("modules/channel/native/openChannelPicker.tsx");
export default function openChannelPicker(onClose) {
let channelType;
let filterFn;
let found;
let guildId;
let intl;
let obj2;
let selectedChannel;
({ guildId, filterFn } = onClose);
({ selectedChannel, channelType } = onClose);
if (filterFn === undefined) {
filterFn = function h() {
return true;
};
}
onClose = onClose.onClose;
const merged = Object.assign(onClose, Object.assign({ selectedChannel: 0, guildId: 0, channelType: 0, filterFn: 0, onClose: 0 }));
const guild = GuildStore.getGuild(guildId);
let items = GuildChannelStore.getChannels(guildId)[channelType];
if (items == null) {
items = [];
}
const openLazy = ActionSheetActionCreatorsDefault.openLazy;
const obj = { header: obj2, guild, channels: found.map((channel) => channel.channel), selectedChannel };
obj2 = { title: intl.string(intl2.t.r2ptsz), onClose };
ActionSheetActionCreatorsDefault;
const tmp4 = asyncRequire(11848, dependencyMap.paths);
intl = intl2.intl;
found = items.filter(filterFn);
const merged1 = Object.assign(merged);
openLazy(tmp4, "ChannelPicker", obj);
};