86 lines
2.8 KiB
TypeScript
86 lines
2.8 KiB
TypeScript
// Metro module 5963 (f5964).
|
|
import * as _PoggermodeConstants from "./PoggermodeConstants";
|
|
import { cloneDeep } from "../../_bundle/Module12";
|
|
import Module589 from "../../_bundle/Module589";
|
|
import Dispatcher from "../../Dispatcher";
|
|
const { ShakeLocation, ConfettiLocation } = _PoggermodeConstants;
|
|
let c3753_0 = false;
|
|
const screenshakeEnabledLocations2 = {};
|
|
screenshakeEnabledLocations2[ShakeLocation.CHAT_INPUT] = true;
|
|
screenshakeEnabledLocations2[ShakeLocation.VOICE_USER] = false;
|
|
screenshakeEnabledLocations2[ShakeLocation.MENTION] = false;
|
|
const confettiEnabledLocations = {};
|
|
confettiEnabledLocations[ConfettiLocation.CHAT_INPUT] = true;
|
|
confettiEnabledLocations[ConfettiLocation.REACTION] = true;
|
|
confettiEnabledLocations[ConfettiLocation.MEMBER_USER] = true;
|
|
confettiEnabledLocations[ConfettiLocation.CALL_TILE] = true;
|
|
const r26 = {
|
|
settingsVisible: false,
|
|
enabled: false,
|
|
combosEnabled: true,
|
|
combosRequiredCount: 5,
|
|
comboSoundsEnabled: true,
|
|
screenshakeEnabled: true,
|
|
screenshakeEnabledLocations: screenshakeEnabledLocations2,
|
|
shakeIntensity: 1,
|
|
confettiEnabled: true,
|
|
confettiEnabledLocations,
|
|
confettiSize: 16,
|
|
confettiCount: 5,
|
|
warningSeen: false
|
|
};
|
|
let c3753_1 = cloneDeep(r26);
|
|
class PoggermodeSettingsStore extends Module589.DeviceSettingsStore {
|
|
static displayName = "PoggermodeSettingsStore";
|
|
static persistKey = "PoggermodeSettingsStore";
|
|
initialize(a0) {
|
|
c3753_1 = {
|
|
...c3753_1,
|
|
...a0
|
|
};
|
|
}
|
|
getUserAgnosticState() {
|
|
return c3753_1;
|
|
}
|
|
get settingsVisible() {
|
|
return c3753_1.settingsVisible;
|
|
}
|
|
isEnabled(r1 = {}) {
|
|
const { confettiLocation, shakeLocation } = r1;
|
|
const r3 = confettiLocation == null || c3753_1.confettiEnabled && c3753_1.confettiEnabledLocations[confettiLocation];
|
|
const r11 = shakeLocation == null || c3753_1.screenshakeEnabled && c3753_1.screenshakeEnabledLocations[shakeLocation];
|
|
return this.settingsVisible && !c3753_0 && c3753_1.enabled && r3 && r11;
|
|
}
|
|
get shakeIntensity() {
|
|
return this.isEnabled() ? c3753_1.shakeIntensity : 0;
|
|
}
|
|
get combosRequiredCount() {
|
|
return this.isEnabled() ? c3753_1.combosRequiredCount : 0;
|
|
}
|
|
get screenshakeEnabled() {
|
|
return c3753_1.screenshakeEnabled;
|
|
}
|
|
get screenshakeEnabledLocations() {
|
|
return c3753_1.screenshakeEnabledLocations;
|
|
}
|
|
get combosEnabled() {
|
|
return c3753_1.combosEnabled;
|
|
}
|
|
get comboSoundsEnabled() {
|
|
return c3753_1.comboSoundsEnabled;
|
|
}
|
|
}
|
|
const poggermodeSettingsStore = new PoggermodeSettingsStore(Dispatcher, {
|
|
POGGERMODE_SETTINGS_UPDATE: function handlePoggermodeSettingsUpdate(a0) {
|
|
c3753_1 = {
|
|
...c3753_1,
|
|
...a0.settings
|
|
};
|
|
},
|
|
POGGERMODE_TEMPORARILY_DISABLED: function handlePoggermodeTemporarilyDisabled() {
|
|
c3753_0 = true;
|
|
}
|
|
});
|
|
export default poggermodeSettingsStore;
|
|
export { r26 as initialState };
|