import{f as useEffect}from"./dom-context-hooks.module-50442785.js";import{_,y as yn}from"./index.module-b23fdad8.js";var RENDER_EVENT="sqm:request-rerender";function useRequestRerender(e){var r=_();useEffect((function(){r.dispatchEvent(new CustomEvent(RENDER_EVENT,{detail:true,bubbles:true,composed:true}))}),e)}function useRerenderListener(){var e=_();var r=yn(),t=r[0],n=r[1];useEffect((function(){var r=function(e){e.stopPropagation();n()};e.addEventListener(RENDER_EVENT,r);return function(){e.removeEventListener(RENDER_EVENT,r)}}),[]);return t}export{useRequestRerender as a,useRerenderListener as u};