2026-09-28 16:18:32 +00:00
|
|
|
// Module ID: 8600
|
|
|
|
|
// Function ID: 8601
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: ApplicationCommandFrecencyHooks
|
2026-09-28 16:18:32 +00:00
|
|
|
// Dependencies: [19, 8593, 1084, 2026, 504, 2]
|
2026-09-26 17:57:22 +00:00
|
|
|
// Exports: useTopCommands, useTopRealCommands
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-09-28 16:18:32 +00:00
|
|
|
// Module 8600 (ApplicationCommandFrecencyHooks)
|
2026-10-01 14:13:23 +00:00
|
|
|
import UserSettingsConstants from "UserSettingsConstants" /* 1084 */;
|
|
|
|
|
import react from "react" /* 19 */;
|
2026-09-28 16:18:32 +00:00
|
|
|
import ApplicationCommandFrecencyStore_mod from "ApplicationCommandFrecencyStore" /* 8593 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
|
|
|
|
const require = globalThis.__r;
|
2026-10-01 14:13:23 +00:00
|
|
|
let _require;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-01 14:13:23 +00:00
|
|
|
let c3;
|
|
|
|
|
let closure_4;
|
2026-09-18 19:45:33 +00:00
|
|
|
let ApplicationCommandFrecencyStore = ApplicationCommandFrecencyStore_mod;
|
2026-10-01 14:13:23 +00:00
|
|
|
({ getFilteredTopCommands: c3, getTopRealCommands: closure_4 } = ApplicationCommandFrecencyStore);
|
|
|
|
|
ApplicationCommandFrecencyStore = ApplicationCommandFrecencyStore_mod;
|
|
|
|
|
const UserSettingsTypes = UserSettingsConstants.UserSettingsTypes;
|
2026-09-26 17:57:22 +00:00
|
|
|
const result = size.fileFinishedImporting("modules/application_commands/ApplicationCommandFrecencyHooks.tsx");
|
|
|
|
|
|
|
|
|
|
export const useTopCommands = function useTopCommands(commandContext) {
|
2026-10-01 14:13:23 +00:00
|
|
|
let stateFromStores;
|
|
|
|
|
let topCommandsWithoutLoadingLatest;
|
2026-09-26 17:57:22 +00:00
|
|
|
_require = commandContext;
|
2026-10-01 14:13:23 +00:00
|
|
|
const effect = react.useEffect(() => {
|
2026-09-26 17:57:22 +00:00
|
|
|
const FrecencyUserSettingsActionCreators = commandContext(stateFromStores[3]).FrecencyUserSettingsActionCreators;
|
2026-09-18 19:45:33 +00:00
|
|
|
const ifUncached = FrecencyUserSettingsActionCreators.loadIfUncached(constants.FRECENCY_AND_FAVORITES_SETTINGS);
|
|
|
|
|
}, []);
|
|
|
|
|
const items = [ApplicationCommandFrecencyStore];
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj = require("get initialized");
|
|
|
|
|
stateFromStores = obj.useStateFromStores(items, () => topCommandsWithoutLoadingLatest.getTopCommandsWithoutLoadingLatest());
|
2026-09-26 17:57:22 +00:00
|
|
|
const items1 = [stateFromStores, commandContext];
|
2026-10-01 14:13:23 +00:00
|
|
|
return react.useMemo(() => _false(stateFromStores, commandContext), items1);
|
2026-09-26 17:57:22 +00:00
|
|
|
};
|
|
|
|
|
export const useTopRealCommands = function useTopRealCommands(arg0) {
|
2026-10-01 14:13:23 +00:00
|
|
|
let closure_0;
|
|
|
|
|
let stateFromStores;
|
|
|
|
|
let topCommandsWithoutLoadingLatest;
|
2026-09-18 19:45:33 +00:00
|
|
|
_require = arg0;
|
2026-10-01 14:13:23 +00:00
|
|
|
const effect = react.useEffect(() => {
|
2026-09-26 17:57:22 +00:00
|
|
|
const FrecencyUserSettingsActionCreators = closure_0(stateFromStores[3]).FrecencyUserSettingsActionCreators;
|
2026-09-18 19:45:33 +00:00
|
|
|
const ifNecessary = FrecencyUserSettingsActionCreators.loadIfNecessary();
|
|
|
|
|
}, []);
|
|
|
|
|
const items = [ApplicationCommandFrecencyStore];
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj = require("get initialized");
|
|
|
|
|
stateFromStores = obj.useStateFromStores(items, () => topCommandsWithoutLoadingLatest.getTopCommandsWithoutLoadingLatest());
|
2026-09-18 19:45:33 +00:00
|
|
|
const items1 = [stateFromStores, arg0];
|
2026-10-01 14:13:23 +00:00
|
|
|
return react.useMemo(() => React3(_false(stateFromStores, closure_0)), items1);
|
2026-09-26 17:57:22 +00:00
|
|
|
};
|