decord/source/stores/NotificationSettingsModalStore.tsx
2026-09-02 09:53:35 +00:00

73 lines
2.8 KiB
TypeScript

// Module ID: 17326
// Function ID: 17327
// Name: FormStates
// Dependencies: [1390, 5487, 1981, 4398, 1908, 4701, 673, 586, 5488, 706, 2]
// Module 17326 (FormStates)
import set from "set" /* 2 */;
import initializeDefault from "initialize" /* 586 */;
import dispatcherDefault from "dispatcher" /* 706 */;
import createChannelRecord from "createChannelRecord" /* 1390 */;
import getFlattenedChannelListDefault from "getFlattenedChannelList" /* 5488 */;
import closure_4 from "setIndex" /* 5487 */;
import closure_5 from "comparator" /* 1981 */;
import closure_6 from "handleInviteData" /* 4398 */;
import closure_7 from "createGuildRecordFromRust" /* 1908 */;
import closure_8 from "updateUserGuildSettingsInternal" /* 4701 */;
import ME from "ME" /* 673 */;
let closure_3 = createChannelRecord.isGuildSelectableChannelType;
const FormStates = ME.FormStates;
const ChannelTypes = ME.ChannelTypes;
let CLOSED = FormStates.CLOSED;
const Store = initializeDefault.Store;
class NotificationSettingsModalStore extends Store {
}
const prototype = NotificationSettingsModalStore.prototype;
prototype["initialize"] = function initialize() {
const self = this;
this.waitFor(closure_4, closure_5, closure_6, closure_7, closure_8);
const items = [closure_8, closure_5, closure_7];
this.syncWith(items, () => self.isOpen());
};
prototype["isOpen"] = function isOpen() {
return CLOSED !== FormStates.CLOSED;
};
prototype["getProps"] = function getProps() {
categories = categories.getCategories(closure_2);
return {
guildId: closure_2,
categories,
guild: guild.getGuild(closure_2),
memberCount: memberCount.getMemberCount(closure_2),
suppressEveryone: store.isSuppressEveryoneEnabled(closure_2),
suppressRoles: store.isSuppressRolesEnabled(closure_2),
mobilePush: store.isMobilePushEnabled(closure_2),
muted: store.isMuted(closure_2),
muteConfig: store.getMuteConfig(closure_2),
messageNotifications: store.getMessageNotifications(closure_2),
channelOverrides: store.getChannelOverrides(closure_2),
channels: getFlattenedChannelListDefault(categories._categories, categories, (channel) => {
const type = channel.channel.type;
let tmp = callback(type);
if (!tmp) {
tmp = type === constants.GUILD_CATEGORY;
}
return tmp;
})
};
};
NotificationSettingsModalStore.displayName = "NotificationSettingsModalStore";
const notificationSettingsModalStore = new NotificationSettingsModalStore(dispatcherDefault, {
NOTIFICATION_SETTINGS_MODAL_OPEN: function handleFormOpen(guildId) {
const OPEN = FormStates.OPEN;
guildId = guildId.guildId;
},
NOTIFICATION_SETTINGS_MODAL_CLOSE: function handleFormClose() {
CLOSED = FormStates.CLOSED;
c2 = null;
}
});
const result = set.fileFinishedImporting("stores/NotificationSettingsModalStore.tsx");
export default notificationSettingsModalStore;