import * as r from "react";
import { useCallbackRef as s } from "../../../../../@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.8_react@19.2.3/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js";
function p(n, e = globalThis?.document) {
  const t = s(n);
  r.useEffect(() => {
    const o = (a) => {
      a.key === "Escape" && t(a);
    };
    return e.addEventListener("keydown", o, { capture: !0 }), () => e.removeEventListener("keydown", o, { capture: !0 });
  }, [t, e]);
}
export {
  p as useEscapeKeydown
};
//# sourceMappingURL=index.es.js.map
