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