import { useState as s, useEffect as D } from "react";
import f from "./getDropDirection.js";
const h = ({ pullRight: r = !1, dropup: e = !1, autoDropDirection: i = !1, dropdownMenuRef: t }, l) => {
  const [o, c] = s(r), [u, p] = s(e), a = () => !(!i || e || r);
  return D(() => {
    if (t.current && a()) {
      const n = f(t.current.parentNode, t.current);
      c(n.pullRight), p(n.dropup);
    }
  }, [...l, t.current]), {
    pullRight: o,
    dropup: u
  };
};
export {
  h as useDropDirection
};
//# sourceMappingURL=useDropDirection.js.map
