decord/alpha/source/modules/safe_area/useSafeAreaInsets.native.tsx

46 lines
1.5 KiB
TypeScript
Raw Normal View History

2026-10-08 09:57:35 +00:00
// Module ID: 1630
// Function ID: 1631
2026-07-20 16:05:17 +00:00
// Name: useSafeAreaInsets
2026-10-08 09:57:35 +00:00
// Dependencies: [1499, 1631, 558, 576, 2]
2026-10-03 08:58:59 +00:00
// Exports: getSafeAreaInsets
2026-07-20 16:05:17 +00:00
2026-10-08 09:57:35 +00:00
// Module 1630 (useSafeAreaInsets)
2026-10-03 08:58:59 +00:00
import react from "react" /* 576 */;
2026-10-08 09:57:35 +00:00
import AppEntryKeyContext from "AppEntryKeyContext" /* 1499 */;
import SafeAreaStoreDefault from "SafeAreaStore" /* 1631 */;
2026-10-03 08:58:59 +00:00
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
2026-10-08 09:57:35 +00:00
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useSafeAreaInsets() {
2026-10-03 08:58:59 +00:00
let tmp4;
const obj = react;
const cResult = obj.c(2);
const obj2 = AppEntryKeyContext;
const appEntryKey = obj2.useAppEntryKey();
if (cResult[0] !== appEntryKey) {
const fn = function t(arg0) {
return arg0.byAppEntry[appEntryKey].safeAreaInsets;
};
cResult[0] = appEntryKey;
cResult[1] = fn;
tmp4 = fn;
} else {
tmp4 = cResult[1];
}
return SafeAreaStoreDefault(tmp4);
2026-10-08 09:57:35 +00:00
}) : (function useSafeAreaInsets() {
2026-10-03 08:58:59 +00:00
const obj = AppEntryKeyContext;
let closure_0 = obj.useAppEntryKey();
return SafeAreaStoreDefault((arg0) => arg0.byAppEntry[closure_0].safeAreaInsets);
});
const result = size.fileFinishedImporting("modules/safe_area/useSafeAreaInsets.native.tsx");
2026-07-20 16:05:17 +00:00
2026-10-03 08:58:59 +00:00
export default tmp2;
2026-07-20 16:05:17 +00:00
export const getSafeAreaInsets = function getSafeAreaInsets(DEFAULT_APP_ENTRY_KEY) {
if (DEFAULT_APP_ENTRY_KEY === undefined) {
DEFAULT_APP_ENTRY_KEY = AppEntryKeyContext.DEFAULT_APP_ENTRY_KEY;
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
const obj = SafeAreaStoreDefault;
return obj.getState().byAppEntry[DEFAULT_APP_ENTRY_KEY].safeAreaInsets;
2026-07-20 16:05:17 +00:00
};