decord/source/modules/parent_tools/FamilyCenterControlledSettingsStore.tsx

84 lines
2.8 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 7146
// Function ID: 7147
2026-07-29 08:29:29 +00:00
// Name: getSettings
// Dependencies: [1342, 1306, 589, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-25 06:04:03 +00:00
// Module 7146 (getSettings)
2026-08-24 06:08:38 +00:00
import initializeDefault from "initialize" /* 589 */;
import dispatcherDefault from "dispatcher" /* 709 */;
import create from "create" /* 1306 */;
import b64ToProto from "b64ToProto" /* 1342 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-29 08:29:29 +00:00
let c2 = false;
let closure_3 = {};
let closure_4 = {};
2026-08-24 06:08:38 +00:00
const Store = initializeDefault.Store;
2026-07-29 08:29:29 +00:00
class FamilyCenterControlledSettingsStore extends Store {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = FamilyCenterControlledSettingsStore.prototype;
prototype["getSettings"] = function getSettings(arg0) {
return dependencyMap[arg0];
};
prototype["getControlledSettings"] = function getControlledSettings(arg0) {
return dependencyMap[arg0];
};
prototype["hasSettingsForUser"] = function hasSettingsForUser(arg0) {
return null != dependencyMap[arg0];
};
prototype["getConsents"] = function getConsents(arg0) {
return dependencyMap2[arg0];
};
prototype["hasConsented"] = function hasConsented(arg0, arg1) {
if (null == arg0) {
return false;
} else {
let tmp3 = null != tmp2;
if (tmp3) {
tmp3 = null != tmp2[arg1] && tmp2[arg1].consented;
const tmp5 = null != tmp2[arg1] && tmp2[arg1].consented;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp3;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
};
Object.defineProperty(prototype, "isLoading", {
get: function isLoading() {
return c2;
},
set: undefined
});
FamilyCenterControlledSettingsStore.displayName = "FamilyCenterControlledSettingsStore";
2026-08-24 06:08:38 +00:00
const familyCenterControlledSettingsStore = new FamilyCenterControlledSettingsStore(dispatcherDefault, {
2026-07-20 16:05:17 +00:00
FAMILY_CENTER_TEEN_SETTINGS_FETCH_START: function handleTeenSettingsFetchStart() {
2026-08-24 06:08:38 +00:00
c2 = true;
2026-07-20 16:05:17 +00:00
},
FAMILY_CENTER_TEEN_SETTINGS_AND_CONSENTS_FETCH_SUCCESS: function handleTeenSettingsAndConsentsFetchSuccess(arg0) {
({ userId, settings, consents } = arg0);
if (null != settings) {
2026-08-24 06:08:38 +00:00
closure_3[userId] = b64ToProto.b64ToPreloadedUserSettingsProto(settings);
const obj = b64ToProto;
2026-07-20 16:05:17 +00:00
}
if (null != consents) {
2026-07-29 08:29:29 +00:00
closure_4[userId] = consents;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
c2 = false;
2026-07-20 16:05:17 +00:00
},
FAMILY_CENTER_TEEN_CONSENTS_UPDATE_SUCCESS: function handleTeenConsentsUpdateSuccess(userId) {
2026-07-29 08:29:29 +00:00
closure_4[userId.userId] = userId.consents;
2026-07-20 16:05:17 +00:00
},
FAMILY_CENTER_TEEN_UPDATE_SETTINGS_SUCCESS: function handleTeenUpdateSettingsSuccess(userId) {
userId = userId.userId;
2026-08-24 06:08:38 +00:00
const result = b64ToProto.b64ToPreloadedUserSettingsProto(userId.settings);
const obj = b64ToProto;
dependencyMap[userId] = b64ToProto.mergeTopLevelFields(create.PreloadedUserSettings, dependencyMap[userId], result);
2026-07-20 16:05:17 +00:00
},
LOGOUT: function handleLogout() {
2026-08-24 06:08:38 +00:00
closure_3 = {};
closure_4 = {};
c2 = false;
2026-07-20 16:05:17 +00:00
}
});
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/parent_tools/FamilyCenterControlledSettingsStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default familyCenterControlledSettingsStore;