decord/source/modules/application_commands/ApplicationCommandFrecencyHooks.tsx

41 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 5681
// Function ID: 48789
2026-07-20 16:05:17 +00:00
// Name: useTopCommands
2026-07-25 08:10:48 +00:00
// Dependencies: [31, 5671, 662, 1331, 566, 2]
2026-07-20 16:05:17 +00:00
// Exports: useTopCommands, useTopRealCommands
2026-07-25 08:10:48 +00:00
// Module 5681 (useTopCommands)
2026-07-23 10:11:24 +00:00
import result from "result";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_5 from "_isNativeReflectConstruct";
import { UserSettingsTypes } from "MAX_FAVORITES";
let closure_3;
let closure_4;
const require = arg1;
({ getFilteredTopCommands: closure_3, getTopRealCommands: closure_4 } = _isNativeReflectConstruct);
const result = require("MAX_FAVORITES").fileFinishedImporting("modules/application_commands/ApplicationCommandFrecencyHooks.tsx");
2026-07-20 16:05:17 +00:00
export const useTopCommands = function useTopCommands(commandContext) {
2026-07-23 10:11:24 +00:00
const _require = commandContext;
2026-07-20 16:05:17 +00:00
const effect = React.useEffect(() => {
2026-07-23 10:11:24 +00:00
const FrecencyUserSettingsActionCreators = commandContext(stateFromStores[3]).FrecencyUserSettingsActionCreators;
const ifUncached = FrecencyUserSettingsActionCreators.loadIfUncached(outer1_6.FRECENCY_AND_FAVORITES_SETTINGS);
2026-07-20 16:05:17 +00:00
}, []);
const items = [closure_5];
2026-07-23 10:11:24 +00:00
stateFromStores = _require(stateFromStores[4]).useStateFromStores(items, () => outer1_5.getTopCommandsWithoutLoadingLatest());
2026-07-20 16:05:17 +00:00
const items1 = [stateFromStores, commandContext];
2026-07-23 10:11:24 +00:00
return React.useMemo(() => outer1_3(stateFromStores, closure_0), items1);
2026-07-20 16:05:17 +00:00
};
export const useTopRealCommands = function useTopRealCommands(arg0) {
2026-07-23 10:11:24 +00:00
const _require = arg0;
2026-07-20 16:05:17 +00:00
const effect = React.useEffect(() => {
2026-07-23 10:11:24 +00:00
const FrecencyUserSettingsActionCreators = callback(stateFromStores[3]).FrecencyUserSettingsActionCreators;
2026-07-20 16:05:17 +00:00
const ifNecessary = FrecencyUserSettingsActionCreators.loadIfNecessary();
}, []);
const items = [closure_5];
2026-07-23 10:11:24 +00:00
stateFromStores = _require(stateFromStores[4]).useStateFromStores(items, () => outer1_5.getTopCommandsWithoutLoadingLatest());
2026-07-20 16:05:17 +00:00
const items1 = [stateFromStores, arg0];
2026-07-23 10:11:24 +00:00
return React.useMemo(() => outer1_4(outer1_3(stateFromStores, closure_0)), items1);
2026-07-20 16:05:17 +00:00
};