decord/alpha/source/modules/channel/native/openChannelPicker.tsx
2026-10-08 09:57:35 +00:00

48 lines
1.7 KiB
TypeScript

// Module ID: 12195
// Function ID: 12196
// Name: openChannelPicker
// Dependencies: [4705, 2086, 5054, 12196, 1999, 1126, 2]
// Exports: default
// Module 12195 (openChannelPicker)
import intl2 from "intl" /* 1126 */;
import asyncRequire from "asyncRequire" /* 1999 */;
import ActionSheetActionCreatorsDefault from "ActionSheetActionCreators" /* 5054 */;
import GuildChannelStore from "GuildChannelStore" /* 4705 */;
import GuildStore from "GuildStore" /* 2086 */;
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(12196, dependencyMap.paths);
intl = intl2.intl;
found = items.filter(filterFn);
const merged1 = Object.assign(merged);
openLazy(tmp4, "ChannelPicker", obj);
};