decord/alpha/source/hooks/useTheme.tsx
github-actions c6aa9eb120 chore: update source for alpha 349.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5030.js (118.4 MB)
2026-10-01 06:55:13 +00:00

36 lines
918 B
TypeScript

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