Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4792.js (118.4 MB)
54 lines
2.1 KiB
TypeScript
54 lines
2.1 KiB
TypeScript
// Module ID: 13736
|
|
// Function ID: 13737
|
|
// Name: settings/NotifSettingsUtils
|
|
// Dependencies: [13737, 1223, 13738, 504, 2]
|
|
// Exports: b64ToDeclarativeSettingsProto, useNotifSettingRadioValue, useNotifSettingToggleValue, useNotifSettingValue
|
|
|
|
// Module 13736 (settings/NotifSettingsUtils)
|
|
import user_settings_UserSettingsUtils from "user_settings/UserSettingsUtils" /* 1223 */;
|
|
import notification_settings from "notification_settings" /* 13738 */;
|
|
import NotifSettingsProtoStore from "NotifSettingsProtoStore" /* 13737 */;
|
|
|
|
const require = globalThis.__r;
|
|
|
|
require = fn;
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/notifications/settings/NotifSettingsUtils.tsx");
|
|
|
|
export const b64ToDeclarativeSettingsProto = function b64ToDeclarativeSettingsProto(declarative_settings_proto) {
|
|
return user_settings_UserSettingsUtils.b64ToProto(notification_settings.DeclarativeSettings, declarative_settings_proto);
|
|
};
|
|
export const useNotifSettingValue = function useNotifSettingValue(arg0) {
|
|
_require = arg0;
|
|
const items = [NotifSettingsProtoStore];
|
|
const items1 = [arg0];
|
|
return require("initialize").useStateFromStores(items, () => NotifSettingsProtoStore.getSetting(closure_0), items1);
|
|
};
|
|
export const useNotifSettingToggleValue = function useNotifSettingToggleValue(GAMING_DEFAULT) {
|
|
_require = GAMING_DEFAULT;
|
|
const items = [NotifSettingsProtoStore];
|
|
const items1 = [GAMING_DEFAULT];
|
|
const stateFromStores = require("initialize").useStateFromStores(items, () => NotifSettingsProtoStore.getSetting(closure_0), items1);
|
|
let flag;
|
|
if (stateFromStores != null) {
|
|
flag = stateFromStores.toggle;
|
|
}
|
|
if (flag == null) {
|
|
flag = true;
|
|
}
|
|
return flag;
|
|
};
|
|
export const useNotifSettingRadioValue = function useNotifSettingRadioValue(arg0) {
|
|
_require = arg0;
|
|
const items = [NotifSettingsProtoStore];
|
|
const items1 = [arg0];
|
|
const stateFromStores = require("initialize").useStateFromStores(items, () => NotifSettingsProtoStore.getSetting(closure_0), items1);
|
|
let num;
|
|
if (stateFromStores != null) {
|
|
num = stateFromStores.radio;
|
|
}
|
|
if (num == null) {
|
|
num = 0;
|
|
}
|
|
return num;
|
|
};
|