"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useBreakpoints = exports.useIsBreakpoint = exports.useBreakpoint = void 0;
const react_1 = require("@chakra-ui/react");
/**
 * Hook to determine the current breakpoint based on the Chakra UI theme
 *
 * @returns The current breakpoint value ("base", "sm", "md", "lg", "xl", "2xl")
 */
const useBreakpoint = () => {
    return (0, react_1.useBreakpointValue)({
        base: 'base',
        sm: 'sm',
        md: 'md',
        lg: 'lg',
        xl: 'xl',
        '2xl': '2xl',
    });
};
exports.useBreakpoint = useBreakpoint;
/**
 * Hook to check if the current viewport is at least a certain breakpoint
 *
 * @param breakpoint - The breakpoint to check against ("sm", "md", "lg", "xl", "2xl")
 * @returns True if the current viewport is at least the specified breakpoint
 */
const useIsBreakpoint = (breakpoint) => {
    const theme = (0, react_1.useTheme)();
    const breakpoints = theme.breakpoints || {};
    const value = breakpoints[breakpoint] || '0';
    const [isLargerThanBreakpoint] = (0, react_1.useMediaQuery)(`(min-width: ${value})`);
    return isLargerThanBreakpoint;
};
exports.useIsBreakpoint = useIsBreakpoint;
/**
 * Hook to get multiple boolean values for different breakpoints
 *
 * @returns An object containing boolean values for each breakpoint
 */
const useBreakpoints = () => {
    const theme = (0, react_1.useTheme)();
    const bps = theme.breakpoints;
    const [isSm] = (0, react_1.useMediaQuery)(`(min-width: ${bps.sm})`);
    const [isMd] = (0, react_1.useMediaQuery)(`(min-width: ${bps.md})`);
    const [isLg] = (0, react_1.useMediaQuery)(`(min-width: ${bps.lg})`);
    const [isXl] = (0, react_1.useMediaQuery)(`(min-width: ${bps.xl})`);
    const [is2Xl] = (0, react_1.useMediaQuery)(`(min-width: ${bps['2xl']})`);
    return {
        isSm,
        isMd,
        isLg,
        isXl,
        is2Xl,
        isMobile: !isMd,
        isTablet: isMd && !isLg,
        isDesktop: isLg,
    };
};
exports.useBreakpoints = useBreakpoints;
//# sourceMappingURL=useBreakpoint.js.map