decord/alpha/source/modules/device/native/WakeLock.tsx

68 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 10918
// Function ID: 10919
2026-07-29 08:29:29 +00:00
// Name: WakeLock
2026-10-09 10:00:15 +00:00
// Dependencies: [19, 558, 576, 10919, 2]
2026-07-20 16:05:17 +00:00
2026-10-09 10:00:15 +00:00
// Module 10918 (WakeLock)
import react_nativeDefault from "react-native" /* 10919 */;
2026-10-03 08:58:59 +00:00
import react from "react" /* 19 */;
import ReactCompilerGating_mod from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
const require = globalThis.__r;
let _require;
2026-07-29 08:29:29 +00:00
2026-10-03 08:58:59 +00:00
let ReactCompilerGating = ReactCompilerGating_mod;
2026-10-08 09:57:35 +00:00
let tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useWakeLock(arg0) {
2026-10-03 08:58:59 +00:00
let closure_0;
let tmp2;
let tmp3;
_require = arg0;
let obj = require("react");
const cResult = obj.c(3);
if (cResult[0] !== arg0) {
2026-10-08 09:57:35 +00:00
const fn = function t() {
2026-10-03 08:58:59 +00:00
let obj = react_nativeDefault;
const lock = obj.requestLock(closure_0);
return () => {
const obj = react_nativeDefault;
obj.releaseLock(closure_1_0);
};
2026-07-29 08:29:29 +00:00
};
2026-10-03 08:58:59 +00:00
const items = [arg0];
cResult[0] = arg0;
cResult[1] = fn;
cResult[2] = items;
tmp3 = items;
tmp2 = fn;
} else {
tmp2 = cResult[1];
tmp3 = cResult[2];
}
const effect = react.useEffect(tmp2, tmp3);
2026-10-08 09:57:35 +00:00
}) : (function useWakeLock(arg0) {
2026-10-03 08:58:59 +00:00
let closure_0 = arg0;
const items = [arg0];
const effect = react.useEffect(() => {
let obj = react_nativeDefault;
const lock = obj.requestLock(closure_0);
2026-07-20 16:05:17 +00:00
return () => {
2026-10-03 08:58:59 +00:00
const obj = react_nativeDefault;
obj.releaseLock(closure_1_0);
2026-07-20 16:05:17 +00:00
};
}, items);
2026-10-03 08:58:59 +00:00
});
let closure_4 = tmp2;
ReactCompilerGating = ReactCompilerGating_mod;
2026-10-08 09:57:35 +00:00
let tmp3 = ReactCompilerGating.isReactCompilerEnabled() ? (function WakeLock(wakeLockKey) {
2026-10-03 08:58:59 +00:00
closure_4(wakeLockKey.wakeLockKey);
return null;
2026-10-08 09:57:35 +00:00
}) : (function WakeLock(wakeLockKey) {
2026-10-03 08:58:59 +00:00
closure_4(wakeLockKey.wakeLockKey);
return null;
});
const result = size.fileFinishedImporting("modules/device/native/WakeLock.tsx");
export default tmp3;
export const useWakeLock = tmp2;