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 h = ({ items: a, dropdownClassName: o, ...s }) => {
  const [l, e] = i(!1);
  return m(() => {
    const t = () => e(!1);
    return window.addEventListener(r, t), () => window.removeEventListener(r, t);
  }, []), /* @__PURE__ */ n(
    p,
    {
      ...s,
      title: /* @__PURE__ */ n("span", { className: "rioglyph rioglyph-checkboxes" }),
      variant: "outline",
      bsSize: "sm",
      toggleClassName: "table-batch-dropdown-button no-hover-scale",
      dropdownClassName: o ? `text-normal ${o}` : "text-normal",
      iconOnly: !0,
      items: a,
      open: l,
      onOpen: () => e(!0),
      onClose: () => e(!1)
    }
  );
};
export {
  h as default
};
//# sourceMappingURL=TableBatchDropdown.js.map
