import * as r from "react";
import { useCallbackRef as s } from "../../../../../@radix-ui_react-use-callback-ref@1.1.0_@types_react@18.3.3_react@18.3.0-canary-3d9b20132-20240124/node_modules/@radix-ui/react-use-callback-ref/dist/index.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.js.map
