import { isRefObject as c } from "../../utils/is-ref-object.es.js";
import { useContext as f } from "react";
import { SwitchLayoutGroupContext as l } from "../../context/SwitchLayoutGroupContext.es.js";
function C(e, t, o, n) {
  var r, u = t.layoutId, i = t.layout, d = t.drag, a = t.dragConstraints, y = t.layoutScroll, p = f(l);
  !n || !o || (o == null ? void 0 : o.projection) || (o.projection = new n(e, o.getLatestValues(), (r = o.parent) === null || r === void 0 ? void 0 : r.projection), o.projection.setOptions({
    layoutId: u,
    layout: i,
    alwaysMeasureLayout: Boolean(d) || a && c(a),
    visualElement: o,
    scheduleRender: function() {
      return o.scheduleRender();
    },
    animationType: typeof i == "string" ? i : "both",
    initialPromotionConfig: p,
    layoutScroll: y
  }));
}
export {
  C as useProjection
};
//# sourceMappingURL=use-projection.es.js.map
