decord/stable/source/hooks/useTheme.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

36 lines
918 B
TypeScript

// Module ID: 4722
// Function ID: 4723
// Name: useTheme
// Dependencies: [1074, 4639, 2]
// Exports: default, getThemeIndex, useTheme, useThemeIndex
// Module 4722 (useTheme)
import Constants from "Constants" /* 1074 */;
import shared from "shared" /* 4639 */;
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;
}
};