"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useTheme = void 0;
const react_1 = require("@chakra-ui/react");
/**
 * Extended hook for accessing the BFUI theme
 *
 * @returns Theme utilities and properties
 */
const useTheme = () => {
    const chakraTheme = (0, react_1.useTheme)();
    const { colorMode, toggleColorMode } = (0, react_1.useColorMode)();
    return {
        // Pass through Chakra theme data
        ...chakraTheme,
        // Color mode utilities
        colorMode,
        toggleColorMode,
        isDarkMode: colorMode === 'dark',
        isLightMode: colorMode === 'light',
        // Common color getters
        primaryColor: chakraTheme.colors.primary[500],
        secondaryColor: chakraTheme.colors.secondary[500],
        accentColor: chakraTheme.colors.accent[500],
        successColor: chakraTheme.colors.success[500],
        warningColor: chakraTheme.colors.warning[500],
        errorColor: chakraTheme.colors.error[500],
        // Returns the appropriate color for the current color mode
        // Example: getColorForMode("white", "gray.800")
        getColorForMode: (lightModeColor, darkModeColor) => {
            return colorMode === 'light' ? lightModeColor : darkModeColor;
        },
        // Get a color by name and shade
        getColor: (colorName, shade = 500) => {
            if (chakraTheme.colors[colorName]) {
                return chakraTheme.colors[colorName][shade];
            }
            return colorName;
        },
    };
};
exports.useTheme = useTheme;
//# sourceMappingURL=useTheme.js.map