decord/source/stores/NotificationSettingsModalStore.tsx

69 lines
2.6 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 16727
// Function ID: 16728
2026-07-29 08:29:29 +00:00
// Name: FormStates
2026-08-15 05:55:55 +00:00
// Dependencies: [1395, 5278, 1980, 4295, 1910, 5043, 676, 589, 5279, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-15 05:55:55 +00:00
// Module 16727 (FormStates)
2026-07-29 08:29:29 +00:00
import { isGuildSelectableChannelType as closure_3 } from "createChannelRecord";
import setIndex from "setIndex";
import comparator from "comparator";
import handleInviteData from "handleInviteData";
import createGuildRecordFromRust from "createGuildRecordFromRust";
import updateUserGuildSettingsInternal from "updateUserGuildSettingsInternal";
2026-07-23 10:11:24 +00:00
import ME from "ME";
2026-07-29 08:29:29 +00:00
import { Store } from "initialize";
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
const FormStates = ME.FormStates;
const ChannelTypes = ME.ChannelTypes;
let CLOSED = FormStates.CLOSED;
2026-07-29 08:29:29 +00:00
class NotificationSettingsModalStore extends Store {
}
const prototype = NotificationSettingsModalStore.prototype;
prototype["initialize"] = function initialize() {
const self = this;
this.waitFor(setIndex, comparator, handleInviteData, createGuildRecordFromRust, updateUserGuildSettingsInternal);
const items = [updateUserGuildSettingsInternal, comparator, createGuildRecordFromRust];
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),
2026-08-15 05:55:55 +00:00
channels: importDefault(5279)(categories._categories, categories, (channel) => {
2026-07-29 08:29:29 +00:00
const type = channel.channel.type;
let tmp = callback(type);
if (!tmp) {
tmp = type === constants.GUILD_CATEGORY;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp;
})
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
};
NotificationSettingsModalStore.displayName = "NotificationSettingsModalStore";
const notificationSettingsModalStore = new NotificationSettingsModalStore(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
NOTIFICATION_SETTINGS_MODAL_OPEN: function handleFormOpen(guildId) {
2026-07-23 10:11:24 +00:00
const OPEN = FormStates.OPEN;
2026-07-20 16:05:17 +00:00
guildId = guildId.guildId;
},
NOTIFICATION_SETTINGS_MODAL_CLOSE: function handleFormClose() {
const CLOSED = FormStates.CLOSED;
2026-07-29 08:29:29 +00:00
let c2 = null;
2026-07-20 16:05:17 +00:00
}
});
2026-07-29 08:29:29 +00:00
const result = require("comparator").fileFinishedImporting("stores/NotificationSettingsModalStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default notificationSettingsModalStore;