decord/alpha/source/hooks/useTheme.tsx
github-actions 1224ea86fd chore: update source for alpha 348.5
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5021.js (118.4 MB)
2026-09-26 08:31:33 +00:00

36 lines
918 B
TypeScript

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