43 lines
1.4 KiB
TypeScript
43 lines
1.4 KiB
TypeScript
// Module ID: 6048
|
|
// Function ID: 6049
|
|
// Name: useBottomSheetKeyboardHandling
|
|
// Dependencies: [19, 5439, 2]
|
|
// Exports: default
|
|
|
|
// Module 6048 (useBottomSheetKeyboardHandling)
|
|
import noop from "noop";
|
|
|
|
const require = arg1;
|
|
let result = require("set").fileFinishedImporting("design/components/Sheet/native/useBottomSheetKeyboardHandling.tsx");
|
|
|
|
export default function useBottomSheetKeyboardHandling(onFocus) {
|
|
onFocus = onFocus.onFocus;
|
|
const onBlur = onFocus.onBlur;
|
|
let bottomSheetInternal;
|
|
bottomSheetInternal = onFocus(onBlur[1]).useBottomSheetInternal(true);
|
|
const items = [bottomSheetInternal, onBlur, onFocus];
|
|
return bottomSheetInternal.useMemo(() => {
|
|
if (null == bottomSheetInternal) {
|
|
let obj = { onFocus: null, onBlur: null };
|
|
obj[0] = onFocus;
|
|
obj[1] = onBlur;
|
|
} else {
|
|
obj = { onFocus: null, onBlur: null };
|
|
obj[0] = function onFocus(arg0) {
|
|
const shouldHandleKeyboardEvents = noop.shouldHandleKeyboardEvents;
|
|
const result = shouldHandleKeyboardEvents.set(true);
|
|
if (closure_0 != null) {
|
|
tmp2(arg0);
|
|
}
|
|
};
|
|
obj[1] = function onBlur(arg0) {
|
|
const shouldHandleKeyboardEvents = noop.shouldHandleKeyboardEvents;
|
|
const result = shouldHandleKeyboardEvents.set(false);
|
|
if (closure_1 != null) {
|
|
tmp2(arg0);
|
|
}
|
|
};
|
|
}
|
|
return obj;
|
|
}, items);
|
|
};
|