decord/alpha/source/hooks/useTheme.tsx
github-actions 97fd043558 chore: update source for alpha 347.5
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4941.js (118.4 MB)
2026-09-19 06:52:51 +00:00

36 lines
918 B
TypeScript

// Module ID: 4690
// Function ID: 4691
// Name: useTheme
// Dependencies: [1074, 4607, 2]
// Exports: default, getThemeIndex, useTheme, useThemeIndex
// Module 4690 (useTheme)
import Constants from "Constants" /* 1074 */;
import shared from "shared" /* 4607 */;
import size from "module_2" /* 2 */;
function useTheme() {
return shared.useThemeContext().theme;
}
const ThemeTypes = Constants.ThemeTypes;
const result = size.fileFinishedImporting("hooks/useTheme.tsx");
export default useTheme;
export { useTheme };
export const useThemeIndex = function useThemeIndex() {
const theme = shared.useThemeContext().theme;
let num = 0;
if (ThemeTypes.DARK !== theme) {
if (ThemeTypes.LIGHT === theme) {
num = 1;
}
}
return num;
};
export const getThemeIndex = function getThemeIndex(arg0) {
if (ThemeTypes.DARK === arg0) {
return 0;
} else if (tmp.LIGHT === arg0) {
return 1;
}
};