import { jsx as e } from "react/jsx-runtime";
import { useMemo as u } from "react";
import x from "../../hooks/useInputGroupAddonContext.js";
import G from "../../hooks/useInputGroupContext.js";
import { c as s } from "../../../../index-BtlgVD4m.js";
import I from "../../../button/Button.js";
const h = ({
  label: d,
  icon: i,
  iconPosition: a = "left",
  variant: o = "default",
  disabled: p = !1,
  isLoading: m = !1,
  onClick: l
}) => {
  const { side: r, inline: t } = x(), { size: n } = G(), f = u(() => t ? "xs" : n, [t, n]), c = u(() => t ? "ghost" : o, [t, o]), b = s(
    "[&_button]:rounded-none",
    r === "left" && "[&_button]:rounded-l-[var(--border-radius-md)]",
    r === "right" && "[&_button]:rounded-r-[var(--border-radius-md)]"
  );
  return /* @__PURE__ */ e("div", { className: s(t ? "" : b), children: /* @__PURE__ */ e(
    I,
    {
      label: d,
      icon: i,
      iconPosition: a,
      variant: c,
      size: f,
      disabled: p,
      isLoading: m,
      onClick: l
    }
  ) });
};
h.displayName = "InputGroupButton";
export {
  h as default
};
//# sourceMappingURL=InputGroupButton.js.map
