decord/stable/source/stores/NotificationSettingsModalStore.tsx
github-actions e2bc0408ee chore: update source for stable 346.13
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-22 22:11:40 +00:00

73 lines
3.1 KiB
TypeScript

// Module ID: 17621
// Function ID: 17622
// Name: NotificationSettingsModalStore
// Dependencies: [1961, 7214, 2012, 4556, 1979, 4817, 1074, 504, 7215, 573, 2]
// Module 17621 (NotificationSettingsModalStore)
import initializeDefault from "initialize" /* 504 */;
import DispatcherDefault from "Dispatcher" /* 573 */;
import ChannelRecord from "ChannelRecord" /* 1961 */;
import getFlattedChannelListDefault from "getFlattedChannelList" /* 7215 */;
import GuildCategoryStore from "GuildCategoryStore" /* 7214 */;
import GuildChannelStore from "GuildChannelStore" /* 2012 */;
import GuildMemberCountStore from "GuildMemberCountStore" /* 4556 */;
import GuildStore from "GuildStore" /* 1979 */;
import UserGuildSettingsStore from "UserGuildSettingsStore" /* 4817 */;
import Constants from "Constants" /* 1074 */;
import size from "module_2" /* 2 */;
let closure_3 = ChannelRecord.isGuildSelectableChannelType;
const FormStates = Constants.FormStates;
const ChannelTypes = Constants.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(GuildCategoryStore, GuildChannelStore, GuildMemberCountStore, GuildStore, UserGuildSettingsStore);
const items = [UserGuildSettingsStore, GuildChannelStore, GuildStore];
this.syncWith(items, () => self.isOpen());
};
prototype["isOpen"] = function isOpen() {
return CLOSED !== FormStates.CLOSED;
};
prototype["getProps"] = function getProps() {
const categories = GuildCategoryStore.getCategories(guildId);
return {
guildId,
categories,
guild: GuildStore.getGuild(guildId),
memberCount: GuildMemberCountStore.getMemberCount(guildId),
suppressEveryone: UserGuildSettingsStore.isSuppressEveryoneEnabled(guildId),
suppressRoles: UserGuildSettingsStore.isSuppressRolesEnabled(guildId),
mobilePush: UserGuildSettingsStore.isMobilePushEnabled(guildId),
muted: UserGuildSettingsStore.isMuted(guildId),
muteConfig: UserGuildSettingsStore.getMuteConfig(guildId),
messageNotifications: UserGuildSettingsStore.getMessageNotifications(guildId),
channelOverrides: UserGuildSettingsStore.getChannelOverrides(guildId),
channels: getFlattedChannelListDefault(categories._categories, categories, (channel) => {
const type = channel.channel.type;
let tmp = closure_1_3(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) {
CLOSED = FormStates.OPEN;
guildId = guildId.guildId;
},
NOTIFICATION_SETTINGS_MODAL_CLOSE: function handleFormClose() {
CLOSED = FormStates.CLOSED;
c2 = null;
}
});
const result = size.fileFinishedImporting("stores/NotificationSettingsModalStore.tsx");
export default notificationSettingsModalStore;