decord/stable/source/modules/keyboard/native/useKeyboardIsOpen.tsx
github-actions 57c2214117 chore: update source for stable 347.12
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
2026-09-29 21:26:22 +00:00

107 lines
3.3 KiB
TypeScript

// Module ID: 6899
// Function ID: 6900
// Name: useKeyboardIsOpen
// Dependencies: [1480, 1481, 1482, 1610, 2]
// Exports: default, getKeyboardIsOpen, subscribeToKeyboardIsOpen
// Module 6899 (useKeyboardIsOpen)
import AppEntryKeyContext from "AppEntryKeyContext" /* 1481 */;
import KeyboardUIStoreDefault from "KeyboardUIStore" /* 1482 */;
import KeyboardTypes from "KeyboardTypes" /* 1610 */;
import subscribeToKeyboardUIStore from "subscribeToKeyboardUIStore" /* 1480 */;
const require = globalThis.__r;
require = fn;
let closure_4 = {};
const size = fn(2);
const result = size.fileFinishedImporting("modules/keyboard/native/useKeyboardIsOpen.tsx");
export default function useKeyboardIsOpen() {
let tmp = arg0;
if (arg0 === undefined) {
tmp = closure_4;
}
let flag = tmp.includeCustomKeyboard;
if (flag === undefined) {
flag = false;
}
importDefault = flag(1481).useAppEntryKey();
return KeyboardUIStoreDefault((arg0) => {
const systemKeyboardOpen = tmp.systemKeyboardOpen;
if (flag) {
let tmp3 = systemKeyboardOpen;
if (!systemKeyboardOpen) {
tmp3 = tmp.keyboardType !== KeyboardTypes.KeyboardTypes.SYSTEM;
}
let tmp2 = tmp3;
} else {
tmp2 = systemKeyboardOpen;
}
return tmp2;
});
};
export const subscribeToKeyboardIsOpen = function subscribeToKeyboardIsOpen(arg0) {
_require = arg0;
let tmp = arg1;
if (arg1 === undefined) {
tmp = closure_4;
}
let flag = tmp.includeCustomKeyboard;
if (flag === undefined) {
flag = false;
}
let DEFAULT_APP_ENTRY_KEY = tmp.appEntryKey;
if (DEFAULT_APP_ENTRY_KEY === undefined) {
DEFAULT_APP_ENTRY_KEY = require("AppEntryKeyContext").DEFAULT_APP_ENTRY_KEY;
}
return subscribeToKeyboardUIStore(() => {
const obj = { includeCustomKeyboard: flag, appEntryKey: DEFAULT_APP_ENTRY_KEY };
flag = obj.includeCustomKeyboard;
if (flag === undefined) {
flag = false;
}
DEFAULT_APP_ENTRY_KEY = obj.appEntryKey;
if (DEFAULT_APP_ENTRY_KEY === undefined) {
DEFAULT_APP_ENTRY_KEY = AppEntryKeyContext.DEFAULT_APP_ENTRY_KEY;
}
const tmp5 = KeyboardUIStoreDefault.getState().byAppEntry[DEFAULT_APP_ENTRY_KEY];
const systemKeyboardOpen = tmp5.systemKeyboardOpen;
if (flag) {
let tmp7 = systemKeyboardOpen;
if (!systemKeyboardOpen) {
tmp7 = tmp5.keyboardType !== KeyboardTypes.KeyboardTypes.SYSTEM;
}
let tmp6 = tmp7;
} else {
tmp6 = systemKeyboardOpen;
}
return closure_0(tmp6);
}, DEFAULT_APP_ENTRY_KEY);
};
export const getKeyboardIsOpen = function getKeyboardIsOpen(arg0) {
let tmp = arg0;
if (arg0 === undefined) {
tmp = closure_4;
}
let flag = tmp.includeCustomKeyboard;
if (flag === undefined) {
flag = false;
}
let DEFAULT_APP_ENTRY_KEY = tmp.appEntryKey;
if (DEFAULT_APP_ENTRY_KEY === undefined) {
DEFAULT_APP_ENTRY_KEY = AppEntryKeyContext.DEFAULT_APP_ENTRY_KEY;
}
const tmp5 = KeyboardUIStoreDefault.getState().byAppEntry[DEFAULT_APP_ENTRY_KEY];
const systemKeyboardOpen = tmp5.systemKeyboardOpen;
if (flag) {
let tmp7 = systemKeyboardOpen;
if (!systemKeyboardOpen) {
tmp7 = tmp5.keyboardType !== KeyboardTypes.KeyboardTypes.SYSTEM;
}
let tmp6 = tmp7;
} else {
tmp6 = systemKeyboardOpen;
}
return tmp6;
};