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

49 lines
1.8 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 15655
// Function ID: 15656
2026-07-20 16:05:17 +00:00
// Name: useAutoSearchGuildChannelTab
2026-08-05 07:35:12 +00:00
// Dependencies: [19, 11609, 11596, 11619, 12, 11594, 2]
2026-07-20 16:05:17 +00:00
// Exports: useAutoSearchGuildChannelTab
2026-08-05 07:35:12 +00:00
// Module 15655 (useAutoSearchGuildChannelTab)
2026-07-29 08:29:29 +00:00
import noop from "noop";
2026-07-23 10:11:24 +00:00
import { SEARCH_TEXT_INPUT_DEBOUNCE_TIME as closure_4 } from "SEARCH_TEXT_INPUT_DEBOUNCE_TIME";
2026-07-22 07:54:56 +00:00
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
let result = require("SearchTokenTypes").fileFinishedImporting("modules/search/native/hooks/useAutoSearchGuildChannelTab.tsx");
2026-07-20 16:05:17 +00:00
export const useAutoSearchGuildChannelTab = function useAutoSearchGuildChannelTab(searchContext, arg1) {
2026-07-23 10:11:24 +00:00
let closure_0 = searchContext;
let closure_1 = arg1;
2026-07-20 16:05:17 +00:00
const items = [searchContext];
2026-07-29 08:29:29 +00:00
const callback = React.useCallback((arg0) => {
2026-07-23 10:11:24 +00:00
let obj = searchContext(callback[2]);
const guildIdFromSearchContext = obj.getGuildIdFromSearchContext(searchContext);
2026-07-20 16:05:17 +00:00
if (null != guildIdFromSearchContext) {
2026-07-29 08:29:29 +00:00
obj = { searchContext: null, searchQueryString: null, guildId: null };
obj[0] = searchContext;
obj[1] = arg0;
obj[2] = guildIdFromSearchContext;
2026-07-23 10:11:24 +00:00
const result = callback(callback[3]).searchGuildChannelTab(obj);
const obj2 = callback(callback[3]);
2026-07-20 16:05:17 +00:00
}
}, items);
const items1 = [arg1, callback];
const effect = React.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 = React.useEffect(() => {
2026-07-23 10:11:24 +00:00
if (!callback) {
const obj = searchContext(callback[4]);
const debounceResult = searchContext(callback[4]).debounce(callback, outer1_4);
return callback(callback[5]).subscribeTextInputValue(searchContext, debounceResult, true);
2026-07-20 16:05:17 +00:00
}
}, items2);
const items3 = [searchContext];
const effect2 = React.useEffect(() => () => {
2026-07-29 08:29:29 +00:00
const result = outer1_1(outer1_2[3]).cleanupGuildChannelTab(closure_0);
2026-07-20 16:05:17 +00:00
}, items3);
};