// Module ID: 7433 // Function ID: 7434 // Name: ChannelSpoilerAgreeStore // Dependencies: [502, 504, 573, 2] // Module 7433 (ChannelSpoilerAgreeStore) import initializeDefault from "initialize" /* 504 */; import DispatcherDefault from "Dispatcher" /* 573 */; import AuthenticationStore from "AuthenticationStore" /* 502 */; let closure_1 = { users: {} }; const DeviceSettingsStore = initializeDefault.DeviceSettingsStore; class ChannelSpoilerAgreeStore extends DeviceSettingsStore { } const prototype = ChannelSpoilerAgreeStore.prototype; prototype["initialize"] = function initialize(users) { this.waitFor(AuthenticationStore); if (null != users) { if (null != users.users) { const obj = { users: users.users }; } closure_1 = { users: {} }; } }; prototype["didAgree"] = function didAgree(arg0) { if (null == arg0) { return false; } else { const id = AuthenticationStore.getId(); let tmp3 = null != id; if (tmp3) { let flag; if (closure_1.users[id] != null) { flag = tmp5.channels[arg0]; } if (!flag) { flag = false; } tmp3 = flag; } return tmp3; } }; prototype["getState"] = function getState() { return closure_1; }; prototype["getUserAgnosticState"] = function getUserAgnosticState() { return closure_1; }; ChannelSpoilerAgreeStore.displayName = "ChannelSpoilerAgreeStore"; ChannelSpoilerAgreeStore.persistKey = "ChannelSpoilerAgreeStore"; const channelSpoilerAgreeStore = new ChannelSpoilerAgreeStore(DispatcherDefault, { CHANNEL_SPOILER_AGREE: function handleChannelSpoilerAgree(channelId) { const id = AuthenticationStore.getId(); if (null == id) { return false; } else { if (null == closure_1.users[id]) { const obj = { channels: {} }; closure_1.users[id] = obj; } closure_1.users[id].channels[channelId.channelId] = true; } }, CHANNEL_SPOILER_AGREE_CLEAR: function handleChannelSpoilerAgreeClear(arg0) { const id = AuthenticationStore.getId(); let tmp4 = null != id; if (tmp4) { if (null != closure_1.users[id]) { const channels = closure_1.users[id].channels; delete tmp[tmp2]; } tmp4 = tmp6; } return tmp4; } }); const size = fn(2); const result = size.fileFinishedImporting("modules/spoiler_channels/ChannelSpoilerAgreeStore.tsx"); export default channelSpoilerAgreeStore;