decord/alpha/source/modules/poggermode/PoggermodeSettingsStore.tsx

132 lines
4.2 KiB
TypeScript
Raw Normal View History

// Module ID: 7086
// Function ID: 7087
// Name: PoggermodeSettingsStore
// Dependencies: [7087, 12, 504, 573, 2]
2026-07-23 10:11:24 +00:00
// Module 7086 (PoggermodeSettingsStore)
import initializeDefault from "initialize" /* 504 */;
import DispatcherDefault from "Dispatcher" /* 573 */;
import PoggermodeConstants from "PoggermodeConstants" /* 7087 */;
import apply from "module_12" /* 12 */;
import size from "module_2" /* 2 */;
2026-07-20 16:05:17 +00:00
({ ShakeLocation, ConfettiLocation } = PoggermodeConstants);
2026-07-29 08:29:29 +00:00
let c0 = false;
let initialState = { settingsVisible: false, enabled: false, combosEnabled: true, combosRequiredCount: 5, comboSoundsEnabled: true, screenshakeEnabled: true, screenshakeEnabledLocations: { [ShakeLocation.CHAT_INPUT]: true, [ShakeLocation.VOICE_USER]: false, [ShakeLocation.MENTION]: false }, shakeIntensity: 1, confettiEnabled: true, confettiEnabledLocations: { [ConfettiLocation.CHAT_INPUT]: true, [ConfettiLocation.REACTION]: true, [ConfettiLocation.MEMBER_USER]: true, [ConfettiLocation.CALL_TILE]: true }, confettiSize: 16, confettiCount: 5, warningSeen: false };
initialState = apply.cloneDeep(initialState);
2026-08-24 06:08:38 +00:00
const DeviceSettingsStore = initializeDefault.DeviceSettingsStore;
2026-07-29 08:29:29 +00:00
class PoggermodeSettingsStore extends DeviceSettingsStore {
}
const prototype = PoggermodeSettingsStore.prototype;
prototype["initialize"] = function initialize(arg0) {
const obj = {};
const merged = Object.assign(obj);
const merged1 = Object.assign(arg0);
};
prototype["getUserAgnosticState"] = function getUserAgnosticState() {
return obj;
2026-07-29 08:29:29 +00:00
};
Object.defineProperty(prototype, "settingsVisible", {
get: function settingsVisible() {
return obj.settingsVisible;
2026-07-29 08:29:29 +00:00
},
set: undefined
});
prototype["isEnabled"] = function isEnabled() {
let obj = arg0;
if (arg0 === undefined) {
obj = {};
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
({ confettiLocation, shakeLocation } = obj);
let tmp = null == confettiLocation;
if (!tmp) {
let confettiEnabled = obj.confettiEnabled;
2026-07-29 08:29:29 +00:00
if (confettiEnabled) {
confettiEnabled = obj.confettiEnabledLocations[confettiLocation];
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp = confettiEnabled;
}
let tmp4 = null == shakeLocation;
if (!tmp4) {
let screenshakeEnabled = obj.screenshakeEnabled;
2026-07-29 08:29:29 +00:00
if (screenshakeEnabled) {
screenshakeEnabled = obj.screenshakeEnabledLocations[shakeLocation];
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp4 = screenshakeEnabled;
}
let enabled = this.settingsVisible;
if (enabled) {
enabled = !c0;
}
if (enabled) {
enabled = obj.enabled;
2026-07-29 08:29:29 +00:00
}
if (enabled) {
enabled = tmp;
}
if (enabled) {
enabled = tmp4;
}
return enabled;
};
Object.defineProperty(prototype, "shakeIntensity", {
get: function shakeIntensity() {
let num = 0;
if (this.isEnabled()) {
num = obj.shakeIntensity;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return num;
},
set: undefined
});
Object.defineProperty(prototype, "combosRequiredCount", {
get: function combosRequiredCount() {
let num = 0;
if (this.isEnabled()) {
num = obj.combosRequiredCount;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return num;
},
set: undefined
});
Object.defineProperty(prototype, "screenshakeEnabled", {
get: function screenshakeEnabled() {
return obj.screenshakeEnabled;
2026-07-29 08:29:29 +00:00
},
set: undefined
});
Object.defineProperty(prototype, "screenshakeEnabledLocations", {
get: function screenshakeEnabledLocations() {
return obj.screenshakeEnabledLocations;
2026-07-29 08:29:29 +00:00
},
set: undefined
});
Object.defineProperty(prototype, "combosEnabled", {
get: function combosEnabled() {
return obj.combosEnabled;
2026-07-29 08:29:29 +00:00
},
set: undefined
});
Object.defineProperty(prototype, "comboSoundsEnabled", {
get: function comboSoundsEnabled() {
return obj.comboSoundsEnabled;
2026-07-29 08:29:29 +00:00
},
set: undefined
});
PoggermodeSettingsStore.displayName = "PoggermodeSettingsStore";
PoggermodeSettingsStore.persistKey = "PoggermodeSettingsStore";
const poggermodeSettingsStore = new PoggermodeSettingsStore(DispatcherDefault, {
2026-07-20 16:05:17 +00:00
POGGERMODE_SETTINGS_UPDATE: function handlePoggermodeSettingsUpdate(settings) {
2026-07-23 10:11:24 +00:00
const obj = {};
const merged = Object.assign(obj);
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(settings.settings);
},
POGGERMODE_TEMPORARILY_DISABLED: function handlePoggermodeTemporarilyDisabled() {
2026-08-24 06:08:38 +00:00
c0 = true;
2026-07-20 16:05:17 +00:00
}
});
const result = size.fileFinishedImporting("modules/poggermode/PoggermodeSettingsStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default poggermodeSettingsStore;
export { initialState };