"use strict";
var import_useMobile = require("../useMobile.css");
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const React = require("react");
const breakpointMobile = "768px";
const styles = {
  breakpointMobile
};
const MOBILE_BREAKPOINT = styles.breakpointMobile;
const queries = window.matchMedia(`only screen and (max-width: ${MOBILE_BREAKPOINT})`);
const useMobile = () => {
  const [isMobile, setIsMobile] = React.useState(queries.matches);
  React.useEffect(() => {
    const onChange = () => setIsMobile(queries.matches);
    queries.addEventListener("change", onChange);
    return () => {
      queries.removeEventListener("change", onChange);
    };
  }, []);
  return isMobile;
};
exports.MOBILE_BREAKPOINT = MOBILE_BREAKPOINT;
exports.default = useMobile;
