import { shallowRef, onMounted, onUnmounted } from 'vue';
import useResponsiveObserver from '../_util/responsiveObserve.mjs';

function useBreakpoint() {
  const screens = shallowRef({});
  let token = null;
  const responsiveObserve = useResponsiveObserver();
  onMounted(() => {
    token = responsiveObserve.value.subscribe((supportScreens) => {
      screens.value = supportScreens;
    });
  });
  onUnmounted(() => {
    responsiveObserve.value.unsubscribe(token);
  });
  return screens;
}

export { useBreakpoint };
//# sourceMappingURL=useBreakpoint.mjs.map
