decord/alpha/source/modules/application_commands/ApplicationCommandFrecencyHooks.tsx

43 lines
2.1 KiB
TypeScript
Raw Normal View History

// Module ID: 8592
// Function ID: 8593
// Name: ApplicationCommandFrecencyHooks
// Dependencies: [19, 8585, 1084, 2025, 504, 2]
2026-07-20 16:05:17 +00:00
// Exports: useTopCommands, useTopRealCommands
// Module 8592 (ApplicationCommandFrecencyHooks)
import noop from "module_19" /* 19 */;
import ApplicationCommandFrecencyStore_mod from "ApplicationCommandFrecencyStore" /* 8585 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
const require = fn;
let ApplicationCommandFrecencyStore = fn(8585);
({ getFilteredTopCommands: c3, getTopRealCommands: closure_4 } = ApplicationCommandFrecencyStore);
let ApplicationCommandFrecencyStore = ApplicationCommandFrecencyStore_mod;
const UserSettingsTypes = fn(1084).UserSettingsTypes;
const size = fn(2);
const result = size.fileFinishedImporting("modules/application_commands/ApplicationCommandFrecencyHooks.tsx");
2026-07-20 16:05:17 +00:00
export const useTopCommands = function useTopCommands(commandContext) {
_require = commandContext;
const effect = noop.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 = [ApplicationCommandFrecencyStore];
stateFromStores = require("initialize").useStateFromStores(items, () => topCommandsWithoutLoadingLatest.getTopCommandsWithoutLoadingLatest());
2026-07-20 16:05:17 +00:00
const items1 = [stateFromStores, commandContext];
return noop.useMemo(() => React3(stateFromStores, closure_0), items1);
2026-07-20 16:05:17 +00:00
};
export const useTopRealCommands = function useTopRealCommands(arg0) {
_require = arg0;
const effect = noop.useEffect(() => {
const FrecencyUserSettingsActionCreators = closure_0(stateFromStores[3]).FrecencyUserSettingsActionCreators;
2026-07-20 16:05:17 +00:00
const ifNecessary = FrecencyUserSettingsActionCreators.loadIfNecessary();
}, []);
const items = [ApplicationCommandFrecencyStore];
stateFromStores = require("initialize").useStateFromStores(items, () => topCommandsWithoutLoadingLatest.getTopCommandsWithoutLoadingLatest());
2026-07-20 16:05:17 +00:00
const items1 = [stateFromStores, arg0];
return noop.useMemo(() => React4(React3(stateFromStores, closure_0)), items1);
2026-07-20 16:05:17 +00:00
};