import i from "react";
import { Controller as c, parseMergedHandlers as d } from "../../core/dist/use-gesture-core.esm.mjs";
import { r as a, e as p } from "../../core/dist/actions-fe213e88.esm.mjs";
import { C as A, E as H, f as R } from "../../core/dist/actions-fe213e88.esm.mjs";
function f(r, n = {}, t, o) {
  const e = i.useMemo(() => new c(r), []);
  if (e.applyHandlers(r, o), e.applyConfig(n, t), i.useEffect(e.effect.bind(e)), i.useEffect(() => e.clean.bind(e), []), n.target === void 0)
    return e.bind.bind(e);
}
function E(r, n) {
  return a(p), f({
    drag: r
  }, n || {}, "drag");
}
function b(r) {
  return r.forEach(a), function(t, o) {
    const {
      handlers: e,
      nativeHandlers: s,
      config: u
    } = d(t, o || {});
    return f(e, u, void 0, s);
  };
}
export {
  A as ConfigResolverMap,
  H as EngineMap,
  b as createUseGesture,
  p as dragAction,
  R as pinchAction,
  a as registerAction,
  E as useDrag
};
