decord/source/modules/search/native/hooks/useAutoSearchGuildChannelTab.tsx

47 lines
1.8 KiB
TypeScript
Raw Normal View History

// Module ID: 16834
// Function ID: 16835
2026-07-20 16:05:17 +00:00
// Name: useAutoSearchGuildChannelTab
// Dependencies: [19, 12483, 12470, 12491, 12, 12468, 2]
2026-07-20 16:05:17 +00:00
// Exports: useAutoSearchGuildChannelTab
// Module 16834 (useAutoSearchGuildChannelTab)
import _mod12 from "module_12" /* 12 */;
import SearchPlatformUtilsDefault from "SearchPlatformUtils" /* 12468 */;
import SearchUtils from "SearchUtils" /* 12470 */;
import SearchPlatformActionCreatorsDefault from "SearchPlatformActionCreators" /* 12491 */;
import noop from "module_19" /* 19 */;
2026-07-22 07:54:56 +00:00
require = fn;
let closure_4 = fn(12483).SEARCH_TEXT_INPUT_DEBOUNCE_TIME;
const size = fn(2);
let result = size.fileFinishedImporting("modules/search/native/hooks/useAutoSearchGuildChannelTab.tsx");
2026-07-20 16:05:17 +00:00
export const useAutoSearchGuildChannelTab = function useAutoSearchGuildChannelTab(searchContext, arg1) {
2026-08-24 06:08:38 +00:00
closure_1 = arg1;
2026-07-20 16:05:17 +00:00
const items = [searchContext];
const callback = noop.useCallback((searchQueryString) => {
const guildIdFromSearchContext = SearchUtils.getGuildIdFromSearchContext(searchContext);
2026-07-20 16:05:17 +00:00
if (null != guildIdFromSearchContext) {
const obj3 = { searchContext, searchQueryString, guildId: guildIdFromSearchContext };
const result = SearchPlatformActionCreatorsDefault.searchGuildChannelTab(obj3);
2026-07-20 16:05:17 +00:00
}
}, items);
const items1 = [arg1, callback];
const effect = noop.useEffect(() => {
2026-07-23 10:11:24 +00:00
if (!closure_1) {
2026-07-20 16:05:17 +00:00
callback("");
}
}, items1);
const items2 = [searchContext, arg1, callback];
const effect1 = noop.useEffect(() => {
if (!closure_1) {
const debounceResult = _mod12.debounce(callback, closure_4);
return SearchPlatformUtilsDefault.subscribeTextInputValue(closure_0, debounceResult, true);
2026-07-20 16:05:17 +00:00
}
}, items2);
const items3 = [searchContext];
const effect2 = noop.useEffect(() => () => {
const result = closure_1(callback[3]).cleanupGuildChannelTab(searchContext);
2026-07-20 16:05:17 +00:00
}, items3);
};