// Module ID: 9443 // Function ID: 9444 // Name: ApplicationCommandFrecencyHooks // Dependencies: [19, 9436, 1088, 558, 568, 2028, 504, 2] // Module 9443 (ApplicationCommandFrecencyHooks) import initialize from "initialize" /* 504 */; import c from "c" /* 568 */; import noop from "module_19" /* 19 */; import ApplicationCommandFrecencyStore_mod from "ApplicationCommandFrecencyStore" /* 9436 */; const require = globalThis.__r; require = fn; let ApplicationCommandFrecencyStore = fn(9436); ({ getFilteredTopCommands: c3, getTopRealCommands: closure_4 } = ApplicationCommandFrecencyStore); let ApplicationCommandFrecencyStore = ApplicationCommandFrecencyStore_mod; const UserSettingsTypes = fn(1088).UserSettingsTypes; fn(558); const ReactCompilerGating = fn(558); const tmp3 = ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => { const cResult = c.c(7); if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) { const fn = function n() { const FrecencyUserSettingsActionCreators = require("UserSettingsProtoActionCreators").FrecencyUserSettingsActionCreators; const ifUncached = FrecencyUserSettingsActionCreators.loadIfUncached(constants.FRECENCY_AND_FAVORITES_SETTINGS); }; const items = []; cResult[0] = fn; cResult[1] = items; tmp4 = fn; tmp5 = items; } else { [tmp4, tmp5] = cResult; } const effect = noop.useEffect(tmp4, tmp5); if (cResult[2] === Symbol.for("react.memo_cache_sentinel")) { const items1 = [ApplicationCommandFrecencyStore]; class S { constructor() { return closure_1_5.getTopCommandsWithoutLoadingLatest(); } } cResult[2] = items1; cResult[3] = S; let tmp8 = S; let tmp7 = items1; } else { tmp7 = cResult[2]; tmp8 = cResult[3]; } const stateFromStores = initialize.useStateFromStores(tmp7, tmp8); if (cResult[4] === arg0) { if (cResult[5] === stateFromStores) { let tmp11 = cResult[6]; } return tmp11; } const tmp12 = React3(stateFromStores, arg0); cResult[4] = arg0; cResult[5] = stateFromStores; cResult[6] = tmp12; tmp11 = tmp12; }) : ((arg0) => { _require = arg0; const effect = noop.useEffect(() => { const FrecencyUserSettingsActionCreators = closure_0(stateFromStores[5]).FrecencyUserSettingsActionCreators; const ifUncached = FrecencyUserSettingsActionCreators.loadIfUncached(constants.FRECENCY_AND_FAVORITES_SETTINGS); }, []); const items = [ApplicationCommandFrecencyStore]; stateFromStores = require("initialize").useStateFromStores(items, () => topCommandsWithoutLoadingLatest.getTopCommandsWithoutLoadingLatest()); const items1 = [stateFromStores, arg0]; return noop.useMemo(() => React3(stateFromStores, closure_0), items1); }); const size = fn(2); const result = size.fileFinishedImporting("modules/application_commands/ApplicationCommandFrecencyHooks.tsx"); export const useTopCommands = tmp3; export const useTopRealCommands = ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => { const cResult = c.c(7); if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) { const fn = function u() { const FrecencyUserSettingsActionCreators = require("UserSettingsProtoActionCreators").FrecencyUserSettingsActionCreators; const ifNecessary = FrecencyUserSettingsActionCreators.loadIfNecessary(); }; const items = []; cResult[0] = fn; cResult[1] = items; tmp4 = fn; tmp5 = items; } else { [tmp4, tmp5] = cResult; } const effect = noop.useEffect(tmp4, tmp5); if (cResult[2] === Symbol.for("react.memo_cache_sentinel")) { const items1 = [ApplicationCommandFrecencyStore]; class S { constructor() { return closure_1_5.getTopCommandsWithoutLoadingLatest(); } } cResult[2] = items1; cResult[3] = S; let tmp8 = S; let tmp7 = items1; } else { tmp7 = cResult[2]; tmp8 = cResult[3]; } const stateFromStores = initialize.useStateFromStores(tmp7, tmp8); if (cResult[4] === arg0) { if (cResult[5] === stateFromStores) { let tmp11 = cResult[6]; } return tmp11; } const tmp12 = React4(React3(stateFromStores, arg0)); cResult[4] = arg0; cResult[5] = stateFromStores; cResult[6] = tmp12; tmp11 = tmp12; }) : ((arg0) => { _require = arg0; const effect = noop.useEffect(() => { const FrecencyUserSettingsActionCreators = closure_0(stateFromStores[5]).FrecencyUserSettingsActionCreators; const ifNecessary = FrecencyUserSettingsActionCreators.loadIfNecessary(); }, []); const items = [ApplicationCommandFrecencyStore]; stateFromStores = require("initialize").useStateFromStores(items, () => topCommandsWithoutLoadingLatest.getTopCommandsWithoutLoadingLatest()); const items1 = [stateFromStores, arg0]; return noop.useMemo(() => React4(React3(stateFromStores, closure_0)), items1); });