import { jsx as n } from "react/jsx-runtime";
import { useState as i, useEffect as m } from "react";
import p from "../../../dropdown/ButtonDropdown.js";
import { TABLE_HORIZONTAL_SCROLL_EVENT as r } from "../../layout/useHorizontalSectionSync.js";
const w = ({ items: a, dropdownClassName: t, ...s }) => {
  const [l, e] = i(!1);
  return m(() => {
    const o = () => e(!1);
    return window.addEventListener(r, o), () => window.removeEventListener(r, o);
  }, []), /* @__PURE__ */ n(
    p,
    {
      ...s,
      title: /* @__PURE__ */ n("span", { className: "rioglyph rioglyph-checkboxes" }),
      variant: "outline",
      bsSize: "sm",
      toggleClassName: "table-batch-dropdown-button",
      dropdownClassName: t ? `text-normal ${t}` : "text-normal",
      iconOnly: !0,
      items: a,
      open: l,
      onOpen: () => e(!0),
      onClose: () => e(!1),
      usePortal: !0
    }
  );
};
export {
  w as default
};
//# sourceMappingURL=TableBatchDropdown.js.map
