decord/source/modules/chat_input/native/useDebouncedSetChatInputState.tsx

57 lines
1.6 KiB
TypeScript
Raw Normal View History

// Module ID: 12484
// Function ID: 12485
2026-09-03 10:05:34 +00:00
// Name: useDebouncedSetChatInputState
// Dependencies: [19, 2]
// Exports: default
// Module 12484 (useDebouncedSetChatInputState)
import noop from "module_19" /* 19 */;
2026-09-03 10:05:34 +00:00
const size = fn(2);
const result = size.fileFinishedImporting("modules/chat_input/native/useDebouncedSetChatInputState.tsx");
2026-09-03 10:05:34 +00:00
export default function useDebouncedSetChatInputState(arg0, arg1) {
closure_0 = arg0;
2026-09-03 10:05:34 +00:00
closure_1 = arg1;
noop.useRef(null);
const callback = noop.useCallback(() => {
2026-09-03 10:05:34 +00:00
if (null != ref.current) {
const _clearTimeout = clearTimeout;
clearTimeout(tmp.current);
tmp.current = null;
}
}, []);
const items = [callback];
const effect = noop.useEffect(() => callback, items);
const obj = { setData: null, setDataImmediate: null };
2026-09-03 10:05:34 +00:00
const items1 = [callback, arg0, arg1];
obj.setData = noop.useCallback((arg0) => {
closure_0 = arg0;
callback();
closure_2.current = setTimeout(() => {
focused((focused) => {
let tmp2 = focused;
if (focused.focused === focused.focused) {
tmp2 = tmp;
if (focused.text === tmp.text) {
2026-09-03 10:05:34 +00:00
tmp2 = tmp;
if (focused.selectionStart === tmp.selectionStart) {
2026-09-03 10:05:34 +00:00
tmp2 = tmp;
if (focused.selectionEnd === tmp.selectionEnd) {
tmp2 = focused;
2026-09-03 10:05:34 +00:00
}
}
}
}
return tmp2;
});
}, closure_1);
}, items1);
const items2 = [callback, arg0];
obj.setDataImmediate = noop.useCallback((arg0) => {
callback();
closure_0(arg0);
}, items2);
return obj;
2026-09-03 10:05:34 +00:00
};