decord/source/modules/devtools/design_toggles/DesignTogglesActions.tsx

33 lines
1 KiB
TypeScript
Raw Normal View History

// Module ID: 15741
// Function ID: 15742
// Name: DesignTogglesActions
// Dependencies: [5641, 573, 2]
2026-07-29 08:29:29 +00:00
// Exports: clearAll, toggle
2026-07-20 16:05:17 +00:00
// Module 15741 (DesignTogglesActions)
import DispatcherDefault from "Dispatcher" /* 573 */;
import DesignTogglesStore from "DesignTogglesStore" /* 5641 */;
2026-07-21 06:55:02 +00:00
const size = fn(2);
const result = size.fileFinishedImporting("modules/devtools/design_toggles/DesignTogglesActions.tsx");
2026-07-29 08:29:29 +00:00
2026-08-04 21:03:28 +00:00
export const toggle = function toggle(toggle, flag) {
let tmp = flag;
if (typeof flag !== "boolean") {
tmp = !DesignTogglesStore.get(toggle);
2026-07-20 16:05:17 +00:00
}
DispatcherDefault.dispatch({ type: "DEV_TOOLS_DESIGN_TOGGLE_SET", toggle, value: tmp });
2026-07-29 08:29:29 +00:00
};
2026-07-20 16:05:17 +00:00
export const clearAll = function clearAll() {
for (const key10005 in DesignTogglesStore.all()) {
2026-07-29 08:29:29 +00:00
let flag = false;
2026-08-04 21:03:28 +00:00
if (typeof false !== "boolean") {
flag = !DesignTogglesStore.get(key10005);
2026-07-29 08:29:29 +00:00
}
let obj = DispatcherDefault;
let obj2 = { type: "DEV_TOOLS_DESIGN_TOGGLE_SET", toggle: key10005, value: flag };
let dispatchResult = obj.dispatch(obj2);
2026-07-23 10:11:24 +00:00
continue;
2026-07-20 16:05:17 +00:00
}
};