decord/source/modules/application_commands/ApplicationCommandFrecencyHooks.tsx

41 lines
2 KiB
TypeScript
Raw Normal View History

2026-08-12 06:57:52 +00:00
// Module ID: 8392
// Function ID: 8393
2026-07-20 16:05:17 +00:00
// Name: useTopCommands
2026-08-12 06:57:52 +00:00
// Dependencies: [19, 8385, 685, 1374, 589, 2]
2026-07-20 16:05:17 +00:00
// Exports: useTopCommands, useTopRealCommands
2026-08-12 06:57:52 +00:00
// Module 8392 (useTopCommands)
2026-07-29 08:29:29 +00:00
import noop from "noop";
import handleUserSettingsProtoStoreChange from "handleUserSettingsProtoStoreChange";
import closure_5 from "handleUserSettingsProtoStoreChange";
2026-07-23 10:11:24 +00:00
import { UserSettingsTypes } from "MAX_FAVORITES";
2026-07-29 08:29:29 +00:00
let c3;
let c4;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ getFilteredTopCommands: c3, getTopRealCommands: c4 } = handleUserSettingsProtoStoreChange);
2026-07-23 10:11:24 +00:00
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;
2026-07-29 08:29:29 +00:00
const ifUncached = FrecencyUserSettingsActionCreators.loadIfUncached(constants.FRECENCY_AND_FAVORITES_SETTINGS);
2026-07-20 16:05:17 +00:00
}, []);
const items = [closure_5];
2026-07-29 08:29:29 +00:00
stateFromStores = _require(stateFromStores[4]).useStateFromStores(items, () => topCommandsWithoutLoadingLatest.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-29 08:29:29 +00:00
stateFromStores = _require(stateFromStores[4]).useStateFromStores(items, () => topCommandsWithoutLoadingLatest.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
};