"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _vueDemi = require("vue-demi");
var _responsiveObserve = _interopRequireDefault(require("../../_util/responsiveObserve"));
function useBreakpoint() {
  const screens = (0, _vueDemi.shallowRef)({});
  let token = null;
  const responsiveObserve = (0, _responsiveObserve.default)();
  (0, _vueDemi.onMounted)(() => {
    token = responsiveObserve.value.subscribe(supportScreens => {
      screens.value = supportScreens;
    });
  });
  (0, _vueDemi.onUnmounted)(() => {
    responsiveObserve.value.unsubscribe(token);
  });
  return screens;
}
var _default = exports.default = useBreakpoint;