// Metro module 8276 (f8277). import { CREATEABLE_NON_VOCAL_CHANNEL_NAME_TYPES } from "../../records/ChannelRecord"; import ChannelStore from "../../stores/ChannelStore"; import { transitionToChannel } from "../../modules/routing/transitionToChannel"; import ModalActionCreators from "../ModalActionCreators"; let c5271_5 = "CREATE_CHANNEL_MODAL_KEY"; const r20 = { CREATE_CHANNEL_MODAL_KEY: "CREATE_CHANNEL_MODAL_KEY", open: function(a0, a1, a2, a3) { if (a1 != null) { let channelType = a0; const r17 = import("../../components_native/CreateChannelModal"); if (a0 == null) { channelType = void 0; } ModalActionCreators.pushLazy(r17, { channelType, guildId: a1, categoryId: a2 == null ? void 0 : a2, cloneChannelId: a3 == null ? void 0 : a3, onChannelCreated: (a0, a1) => { this.close(); const channel = ChannelStore.getChannel(a0); if (a1 != null && channel != null && CREATEABLE_NON_VOCAL_CHANNEL_NAME_TYPES.has(channel.type)) { transitionToChannel(a0); } } }, c5271_5); } }, close: () => { ModalActionCreators.popWithKey(c5271_5); } }; export default r20;