import "../../chunks/chunk.QU3DSPNU.js";
import { isServer } from "../helpers/platform.js";
const standardBreakpoints = {
  sm: "(min-width: 576px)",
  md: "(min-width: 768px)",
  lg: "(min-width: 1024px)",
  xl: "(min-width: 1280px)"
};
function watchMediaQuery(q) {
  return (proto, _propertyKey, descriptor) => {
    if (isServer) return;
    const mediaQuery = window.matchMedia(q);
    const connectedCallback = proto.connectedCallback;
    const disconnectedCallback = proto.disconnectedCallback;
    proto.connectedCallback = function() {
      connectedCallback?.call(this);
      const listener = (e) => {
        descriptor.value?.call(this, e.matches);
      };
      mediaQuery.addEventListener("change", listener);
      this.disconnectedCallback = function() {
        disconnectedCallback?.call(this);
        mediaQuery.removeEventListener("change", listener);
      };
      descriptor.value?.call(this, mediaQuery.matches);
    };
  };
}
export {
  standardBreakpoints,
  watchMediaQuery
};
