2026-09-12 13:45:10 +00:00
|
|
|
// Module ID: 16834
|
|
|
|
|
// Function ID: 16835
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useAutoSearchPeopleTab
|
2026-09-12 13:45:10 +00:00
|
|
|
// Dependencies: [19, 12468, 12482, 9978, 12490, 12, 12467, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: useAutoSearchPeopleTab
|
|
|
|
|
|
2026-09-12 13:45:10 +00:00
|
|
|
// Module 16834 (useAutoSearchPeopleTab)
|
2026-09-10 05:38:07 +00:00
|
|
|
import _mod12 from "module_12" /* 12 */;
|
2026-09-12 13:45:10 +00:00
|
|
|
import UserAffinitiesActionCreators from "UserAffinitiesActionCreators" /* 9978 */;
|
|
|
|
|
import SearchPlatformUtilsDefault from "SearchPlatformUtils" /* 12467 */;
|
|
|
|
|
import SearchPlatformActionCreatorsDefault from "SearchPlatformActionCreators" /* 12490 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import noop from "module_19" /* 19 */;
|
2026-09-12 13:45:10 +00:00
|
|
|
import SearchQueryStore from "SearchQueryStore" /* 12468 */;
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
require = fn;
|
2026-09-12 13:45:10 +00:00
|
|
|
let closure_5 = fn(12482).SEARCH_TEXT_INPUT_DEBOUNCE_TIME;
|
2026-09-10 05:38:07 +00:00
|
|
|
const size = fn(2);
|
|
|
|
|
const result = size.fileFinishedImporting("modules/search/native/hooks/useAutoSearchPeopleTab.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export const useAutoSearchPeopleTab = function useAutoSearchPeopleTab(searchContext, arg1) {
|
2026-08-24 06:08:38 +00:00
|
|
|
closure_0 = searchContext;
|
|
|
|
|
closure_1 = arg1;
|
2026-07-20 16:05:17 +00:00
|
|
|
const items = [arg1, searchContext];
|
2026-09-10 05:38:07 +00:00
|
|
|
const effect = noop.useEffect(() => {
|
|
|
|
|
if (!closure_1) {
|
|
|
|
|
const userAffinitiesV2 = UserAffinitiesActionCreators.fetchUserAffinitiesV2();
|
|
|
|
|
SearchPlatformActionCreatorsDefault.searchPeopleTab(closure_0, "");
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}, items);
|
|
|
|
|
const items1 = [searchContext, arg1];
|
2026-09-10 05:38:07 +00:00
|
|
|
const effect1 = noop.useEffect(() => {
|
|
|
|
|
if (!closure_1) {
|
|
|
|
|
const debounceResult = _mod12.debounce((searchQueryString) => {
|
|
|
|
|
if (!autocompleteVisible.isAutocompleteVisible(searchContext)) {
|
2026-09-12 13:45:10 +00:00
|
|
|
closure_1(12490).searchPeopleTab(searchContext, searchQueryString);
|
|
|
|
|
const obj = closure_1(12490);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
}, closure_5);
|
|
|
|
|
return SearchPlatformUtilsDefault.subscribeTextInputValue(closure_0, debounceResult);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}, items1);
|
|
|
|
|
const items2 = [searchContext];
|
2026-09-10 05:38:07 +00:00
|
|
|
const effect2 = noop.useEffect(() => () => {
|
2026-09-12 13:45:10 +00:00
|
|
|
closure_1(12490).cleanupPeopleTab(searchContext);
|
2026-07-20 16:05:17 +00:00
|
|
|
}, items2);
|
|
|
|
|
};
|