decord/source/modules/safe_area/useSafeAreaInsetsKeyboardAware.native.tsx

124 lines
3.3 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 5475
// Function ID: 5476
2026-07-20 16:05:17 +00:00
// Name: useSafeAreaInsetsKeyboardAware
2026-08-25 06:04:03 +00:00
// Dependencies: [32, 19, 1496, 5476, 5477, 1629, 1497, 500, 1895, 4244, 1627, 5478, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 5475 (useSafeAreaInsetsKeyboardAware)
2026-08-24 06:08:38 +00:00
import closure_3 from "_slicedToArray" /* 32 */;
import closure_4 from "noop" /* 19 */;
import closure_5 from "subscribeToKeyboardUIStore" /* 1496 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/safe_area/useSafeAreaInsetsKeyboardAware.native.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default function useSafeAreaInsetsKeyboardAware() {
let obj = arg0;
if (arg0 === undefined) {
2026-07-20 16:05:17 +00:00
obj = {};
}
let flag = obj.isKeyboardAwareOnIOS;
if (flag === undefined) {
flag = true;
}
let flag2 = obj.isKeyboardAwareOnAndroid;
if (flag2 === undefined) {
flag2 = true;
}
2026-08-24 06:08:38 +00:00
importDefault = flag2;
2026-07-20 16:05:17 +00:00
let flag3 = obj.includeCustomKeyboardHeight;
if (flag3 === undefined) {
flag3 = true;
}
let flag4 = obj.includeKeyboardHeight;
if (flag4 === undefined) {
flag4 = false;
}
2026-07-23 10:11:24 +00:00
let appEntryKey;
2026-07-20 16:05:17 +00:00
let callback;
2026-07-23 10:11:24 +00:00
let ref;
2026-07-29 08:29:29 +00:00
c6 = undefined;
const tmp2 = importDefault(flag3[5])();
appEntryKey = flag(flag3[6]).useAppEntryKey();
const items = [appEntryKey, flag3, flag, flag2];
2026-07-23 10:11:24 +00:00
callback = callback.useCallback(() => {
2026-07-20 16:05:17 +00:00
let obj = flag(flag3[7]);
if (obj.isIOS()) {
if (!flag) {
return 0;
}
}
2026-07-29 08:29:29 +00:00
let tmpResult = tmp(tmp2[7]);
if (tmpResult.isAndroid()) {
if (!closure_1) {
2026-07-20 16:05:17 +00:00
return 0;
}
}
2026-07-29 08:29:29 +00:00
tmpResult = tmp(tmp2[8]);
2026-07-20 16:05:17 +00:00
obj = { appEntryKey };
2026-07-29 08:29:29 +00:00
let systemKeyboardHeight = tmpResult.getSystemKeyboardHeight(obj);
2026-07-20 16:05:17 +00:00
if (0 === systemKeyboardHeight) {
2026-07-29 08:29:29 +00:00
const keyboardType = tmp(tmp2[9]).getKeyboardType(tmp5);
let num3 = 0;
if (keyboardType !== tmp(tmp2[10]).KeyboardTypes.SYSTEM) {
num3 = 0;
2026-07-20 16:05:17 +00:00
if (flag3) {
2026-07-29 08:29:29 +00:00
num3 = tmp(tmp2[11]).getCustomKeyboardHeight(tmp5);
const tmpResult2 = tmp(tmp2[11]);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
systemKeyboardHeight = num3;
const tmpResult1 = tmp(tmp2[9]);
2026-07-20 16:05:17 +00:00
}
return systemKeyboardHeight;
}, items);
2026-07-23 10:11:24 +00:00
ref = callback.useRef(callback());
2026-07-29 08:29:29 +00:00
const obj2 = flag(flag3[6]);
let tmp = flag3;
const tmp3 = flag;
[tmp8, c6] = appEntryKey(callback.useState(ref.current), 2);
2026-07-20 16:05:17 +00:00
const items1 = [callback, flag, flag2];
2026-07-29 08:29:29 +00:00
const effect = callback.useEffect(() => ref(() => {
const tmp = callback();
if (ref.current !== tmp) {
ref.current = tmp;
callback2(tmp);
2026-07-20 16:05:17 +00:00
}
}), items1);
2026-07-29 08:29:29 +00:00
let isAndroidResult = !flag;
if (flag) {
isAndroidResult = !flag4;
}
2026-07-20 16:05:17 +00:00
if (!isAndroidResult) {
2026-07-29 08:29:29 +00:00
isAndroidResult = tmp3(tmp[7]).isAndroid();
const tmp3Result = tmp3(tmp[7]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
flag = isAndroidResult;
importDefault = obj3.useRef(false);
const items2 = [tmp8, isAndroidResult];
const effect1 = obj3.useEffect(() => {
const keyboardDuration = flag(flag3[3]).getKeyboardDuration();
if (ref.current) {
if (0 !== keyboardDuration) {
if (!flag) {
const result = flag(flag3[4]).DeprecatedLayoutAnimationKeyboard(keyboardDuration);
const tmpResult = flag(flag3[4]);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
}
ref.current = true;
}, items2);
let num = 0;
2026-07-20 16:05:17 +00:00
if (flag4) {
2026-07-29 08:29:29 +00:00
num = tmp8;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let insets = tmp2;
if (tmp8 > 0) {
obj = {};
const merged = Object.assign(tmp2);
obj.bottom = num;
insets = obj;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return { insets };
2026-07-20 16:05:17 +00:00
};