decord/source/modules/device/useThermalState.tsx

57 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 10567
// Function ID: 82341
2026-07-20 16:05:17 +00:00
// Name: _getThermalState
2026-07-27 11:26:19 +00:00
// Dependencies: [477, 10565, 2]
2026-07-20 16:05:17 +00:00
// Exports: default, getThermalState
2026-07-27 11:26:19 +00:00
// Module 10567 (_getThermalState)
2026-07-20 16:05:17 +00:00
function _getThermalState(rawThermalState) {
if (null == rawThermalState) {
return obj.UNHANDLED;
} else {
if (obj2.isIOS()) {
return rawThermalState;
} else {
2026-07-23 10:11:24 +00:00
obj = require(477) /* set */;
2026-07-20 16:05:17 +00:00
if (obj.isAndroid()) {
if (obj.NONE === rawThermalState) {
return obj.NOMINAL;
} else {
if (obj.LIGHT !== rawThermalState) {
if (obj.MODERATE !== rawThermalState) {
if (obj.SEVERE === rawThermalState) {
return obj.SERIOUS;
} else {
if (obj.CRITICAL !== rawThermalState) {
if (obj.EMERGENCY !== rawThermalState) {
if (obj.SHUTDOWN !== rawThermalState) {
return obj.UNHANDLED;
}
}
}
return obj.CRITICAL;
}
}
}
return obj.FAIR;
}
} else {
return obj.UNHANDLED;
}
}
2026-07-23 10:11:24 +00:00
obj2 = require(477) /* set */;
2026-07-20 16:05:17 +00:00
}
}
let obj = { UNHANDLED: -1, [-1]: "UNHANDLED", NOMINAL: 0, [0]: "NOMINAL", FAIR: 1, [1]: "FAIR", SERIOUS: 2, [2]: "SERIOUS", CRITICAL: 3, [3]: "CRITICAL" };
obj = { NONE: 0, [0]: "NONE", LIGHT: 1, [1]: "LIGHT", MODERATE: 2, [2]: "MODERATE", SEVERE: 3, [3]: "SEVERE", CRITICAL: 4, [4]: "CRITICAL", EMERGENCY: 5, [5]: "EMERGENCY", SHUTDOWN: 6, [6]: "SHUTDOWN" };
2026-07-23 10:11:24 +00:00
const result = require("set").fileFinishedImporting("modules/device/useThermalState.tsx");
2026-07-20 16:05:17 +00:00
export default function useThermalState() {
2026-07-27 11:26:19 +00:00
return _getThermalState(importDefault(10565).useRawThermalState());
2026-07-20 16:05:17 +00:00
};
export const ThermalStates = obj;
export const AndroidThermalStates = obj;
export const getThermalState = function getThermalState() {
2026-07-27 11:26:19 +00:00
return _getThermalState(importDefault(10565).getRawThermalState());
2026-07-20 16:05:17 +00:00
};