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

45 lines
1.7 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 15484
// Function ID: 118978
2026-07-20 16:05:17 +00:00
// Name: useAutoSearchPeopleTab
2026-07-27 11:26:19 +00:00
// Dependencies: [31, 10041, 11391, 8748, 11398, 22, 11390, 2]
2026-07-20 16:05:17 +00:00
// Exports: useAutoSearchPeopleTab
2026-07-27 11:26:19 +00:00
// Module 15484 (useAutoSearchPeopleTab)
2026-07-23 10:11:24 +00:00
import result from "result";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import { SEARCH_TEXT_INPUT_DEBOUNCE_TIME as closure_5 } from "SEARCH_TEXT_INPUT_DEBOUNCE_TIME";
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
const require = arg1;
const result = require("SEARCH_TEXT_INPUT_DEBOUNCE_TIME").fileFinishedImporting("modules/search/native/hooks/useAutoSearchPeopleTab.tsx");
2026-07-20 16:05:17 +00:00
export const useAutoSearchPeopleTab = function useAutoSearchPeopleTab(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 = [arg1, searchContext];
const effect = React.useEffect(() => {
2026-07-23 10:11:24 +00:00
if (!callback) {
const userAffinitiesV2 = searchContext(outer1_2[3]).fetchUserAffinitiesV2();
const obj = searchContext(outer1_2[3]);
callback(outer1_2[4]).searchPeopleTab(searchContext, "");
const obj2 = callback(outer1_2[4]);
2026-07-20 16:05:17 +00:00
}
}, items);
const items1 = [searchContext, arg1];
const effect1 = React.useEffect(() => {
2026-07-23 10:11:24 +00:00
if (!callback) {
let obj = searchContext(outer1_2[5]);
const debounceResult = searchContext(outer1_2[5]).debounce((searchQueryString) => {
if (!outer2_4.isAutocompleteVisible(outer1_0)) {
callback(outer2_2[4]).searchPeopleTab(outer1_0, searchQueryString);
const obj = callback(outer2_2[4]);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
}, outer1_5);
return callback(outer1_2[6]).subscribeTextInputValue(searchContext, debounceResult);
2026-07-20 16:05:17 +00:00
}
}, items1);
const items2 = [searchContext];
const effect2 = React.useEffect(() => () => {
2026-07-23 10:11:24 +00:00
callback(outer2_2[4]).cleanupPeopleTab(outer1_0);
2026-07-20 16:05:17 +00:00
}, items2);
};