decord/alpha/source/actions/native/CreateChannelModalActionCreators.tsx

48 lines
1.6 KiB
TypeScript

// Module ID: 9982
// Function ID: 9983
// Name: CreateChannelModalActionCreators
// Dependencies: [1962, 1958, 4733, 4925, 9977, 1897, 2]
// Module 9982 (CreateChannelModalActionCreators)
import ChannelRecord from "ChannelRecord" /* 1962 */;
import transitionToChannel from "transitionToChannel" /* 4733 */;
import ModalActionCreatorsDefault from "ModalActionCreators" /* 4925 */;
import ChannelStore from "ChannelStore" /* 1958 */;
import size from "module_2" /* 2 */;
const isGuildReadableType = ChannelRecord.isGuildReadableType;
const CREATE_CHANNEL_MODAL_KEY = "CREATE_CHANNEL_MODAL_KEY";
const result = size.fileFinishedImporting("actions/native/CreateChannelModalActionCreators.tsx");
export default {
CREATE_CHANNEL_MODAL_KEY: "CREATE_CHANNEL_MODAL_KEY",
open(arg0, guildId, categoryId, cloneChannelId) {
const self = this;
if (null != guildId) {
const obj2 = ModalActionCreatorsDefault;
const tmp = arg0;
let obj = {
channelType: tmp,
guildId,
categoryId,
cloneChannelId,
onChannelCreated(id, arg1) {
self.close();
const channel = ChannelStore.getChannel(id);
let tmp3 = null != arg1 && null != channel;
if (tmp3) {
tmp3 = isGuildReadableType(channel.type);
}
if (tmp3) {
transitionToChannel.transitionToChannel(id);
}
}
};
obj2.pushLazy(self(1897)(9977, dependencyMap.paths), obj, CREATE_CHANNEL_MODAL_KEY);
const tmp9 = self(1897)(9977, dependencyMap.paths);
}
},
close() {
ModalActionCreatorsDefault.popWithKey(CREATE_CHANNEL_MODAL_KEY);
}
};