import { jsx as i } from "react/jsx-runtime";
import { forwardRef as B } from "react";
import C from "../button/Button.js";
import R from "../../hooks/useMergeRefs.js";
import c from "../../utils/classNames.js";
const z = B((f, u) => {
  const {
    id: e,
    disabled: t,
    iconName: d,
    bsSize: g,
    bsStyle: m,
    variant: b,
    splitButton: o = !1,
    onClick: s,
    toggleButtonType: p = "button",
    className: n = "",
    as: h,
    children: r,
    outerRef: y,
    iconOnly: N,
    ...l
  } = f, a = R(y, u), v = c(!o && "dropdown-toggle", !o && n), w = c(
    "dropdown-toggle",
    "label",
    `label-${m}`,
    "display-flex align-items-center",
    "user-select-none cursor-pointer",
    t && "pointer-events-none",
    n
  ), x = c(
    "dropdown-toggle",
    "tag",
    "clickable height-auto",
    g === "sm" && "tag-small",
    "display-flex align-items-center",
    "user-select-none cursor-pointer",
    t && "pointer-events-none",
    n
  );
  return p === "tag" ? /* @__PURE__ */ i(
    "div",
    {
      ...l,
      id: e,
      ref: a,
      onClick: s,
      className: x,
      children: r
    }
  ) : p === "label" ? /* @__PURE__ */ i(
    "div",
    {
      ...l,
      id: e,
      ref: a,
      onClick: s,
      className: w,
      children: r
    }
  ) : /* @__PURE__ */ i(
    C,
    {
      ...l,
      id: o ? `button-${e}` : e,
      type: "button",
      ref: a,
      disabled: t,
      bsStyle: m,
      bsSize: g,
      variant: b,
      onClick: s,
      iconName: d,
      iconOnly: N,
      className: v,
      children: r
    }
  );
});
export {
  z as default
};
//# sourceMappingURL=DropdownToggleButton.js.map
