"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = require("react");
const utils_1 = require("../utils");
const useResize_1 = __importDefault(require("./useResize"));
const useLayoutIsMobile = () => {
    const [isMobile, setIsMobile] = (0, react_1.useState)(true);
    const handleResize = (0, react_1.useCallback)(() => {
        setIsMobile(window.outerWidth <= utils_1.MediaQuerySize.Mobile);
    }, []);
    (0, useResize_1.default)(handleResize);
    return isMobile;
};
exports.default = useLayoutIsMobile;
