decord/source/modules/settings/native/renderer/SettingHookHarness.tsx

97 lines
2.7 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 13771
// Function ID: 13772
2026-07-20 16:05:17 +00:00
// Name: map
2026-08-05 07:35:12 +00:00
// Dependencies: [32, 19, 13768, 10334, 13772, 2]
2026-07-20 16:05:17 +00:00
// Exports: getCachedSettingSearchTerms, getCachedSettingTitle
2026-08-05 07:35:12 +00:00
// Module 13771 (map)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
2026-07-29 08:29:29 +00:00
import importAllResult from "noop";
2026-07-23 10:11:24 +00:00
import zustandStore from "zustandStore";
import { NodeType } from "GUILD_SELECT_ALL_SERVERS_OPTION_ID";
const require = arg1;
2026-07-29 08:29:29 +00:00
let c3 = importAllResult;
2026-07-20 16:05:17 +00:00
let closure_6 = [];
const map = new Map();
const map1 = new Map();
const memoResult = importAllResult.memo(function SettingHookHarness() {
let obj2;
let tmp3;
2026-07-23 10:11:24 +00:00
field = field.getField("blocklist");
2026-07-20 16:05:17 +00:00
const items = [];
const items1 = [];
2026-07-23 10:11:24 +00:00
const entries = Object.entries(items(items1[4]).SETTING_RENDERER_CONFIG);
2026-07-20 16:05:17 +00:00
let num = 0;
if (0 < entries.length) {
while (true) {
let tmp = callback;
let tmp2 = callback(entries[num], 2);
[tmp3, obj2] = tmp2;
let usePredicate = obj2.usePredicate;
2026-07-29 08:29:29 +00:00
let tmp4 = num;
2026-07-20 16:05:17 +00:00
let predicate;
2026-07-29 08:29:29 +00:00
if (usePredicate != null) {
2026-07-20 16:05:17 +00:00
predicate = usePredicate();
}
2026-07-29 08:29:29 +00:00
let tmp6 = false === predicate;
if (tmp6) {
2026-07-20 16:05:17 +00:00
if (!field.has(tmp3)) {
let arr = items.push(tmp3);
}
2026-07-29 08:29:29 +00:00
let tmp10 = NodeType;
2026-07-20 16:05:17 +00:00
if (obj2.type !== NodeType.GUILD_SELECTOR) {
2026-07-29 08:29:29 +00:00
let tmp11 = map;
2026-07-20 16:05:17 +00:00
let result = map.set(tmp3, obj2.useTitle());
2026-07-29 08:29:29 +00:00
let useSearchTerms = obj2.useSearchTerms;
2026-07-20 16:05:17 +00:00
let searchTerms;
2026-07-29 08:29:29 +00:00
if (useSearchTerms != null) {
searchTerms = useSearchTerms();
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp14 = map1;
if (searchTerms == null) {
searchTerms = closure_6;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let result1 = map1.set(tmp3, searchTerms);
2026-07-20 16:05:17 +00:00
}
num = num + 1;
if (num >= entries.length) {
break;
}
}
2026-07-29 08:29:29 +00:00
let hasItem = !tmp6;
if (!tmp6) {
2026-07-20 16:05:17 +00:00
hasItem = field.has(tmp3);
}
if (hasItem) {
arr = items1.push(tmp3);
}
}
}
const effect = importAllResult.useEffect(() => {
2026-07-23 10:11:24 +00:00
if (set.length > 0) {
2026-07-20 16:05:17 +00:00
const _Set = Set;
2026-07-23 10:11:24 +00:00
set = new Set(outer1_4.getField("blocklist"));
const item = set.forEach((arg0) => set.add(arg0));
2026-07-20 16:05:17 +00:00
const item1 = items1.forEach((arg0) => set.delete(arg0));
2026-07-29 08:29:29 +00:00
const obj = { blocklist: null };
obj[0] = set;
2026-07-23 10:11:24 +00:00
outer1_4.setState(obj);
2026-07-20 16:05:17 +00:00
}
});
return null;
});
2026-07-23 10:11:24 +00:00
let result = require("zustandStore").fileFinishedImporting("modules/settings/native/renderer/SettingHookHarness.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult;
2026-07-29 08:29:29 +00:00
export const getCachedSettingTitle = function getCachedSettingTitle(setting) {
return map.get(setting);
2026-07-20 16:05:17 +00:00
};
export const getCachedSettingSearchTerms = function getCachedSettingSearchTerms(arg0) {
let value = map1.get(arg0);
2026-07-29 08:29:29 +00:00
if (value == null) {
2026-07-20 16:05:17 +00:00
value = closure_6;
}
return value;
};