decord/alpha/source/hooks/useTheme.tsx

37 lines
918 B
TypeScript
Raw Normal View History

// Module ID: 4763
// Function ID: 4764
2026-07-20 16:05:17 +00:00
// Name: useTheme
// Dependencies: [1074, 4680, 2]
2026-07-29 08:29:29 +00:00
// Exports: default, getThemeIndex, useTheme, useThemeIndex
2026-07-20 16:05:17 +00:00
// Module 4763 (useTheme)
import Constants from "Constants" /* 1074 */;
import shared from "shared" /* 4680 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
function useTheme() {
return shared.useThemeContext().theme;
2026-07-20 16:05:17 +00:00
}
const ThemeTypes = Constants.ThemeTypes;
const result = size.fileFinishedImporting("hooks/useTheme.tsx");
2026-07-20 16:05:17 +00:00
export default useTheme;
export { useTheme };
export const useThemeIndex = function useThemeIndex() {
const theme = shared.useThemeContext().theme;
2026-07-29 08:29:29 +00:00
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;
}
2026-07-20 16:05:17 +00:00
};