import { jsxs as b, jsx as w } from "react/jsx-runtime";
import r from "prop-types";
import i from "lodash/isUndefined";
import x from "../Button/index.js";
import { mergeProps as y } from "../Util/index.js";
import { withDeprecated as v } from "../Util/deprecate.js";
function s({ ...d }) {
  const t = Object.assign({}, d);
  i(t.gradient) && (t.gradient = ""), i(t.icon) && (t.icon = ""), i(t.text) && (t.text = ""), i(t.color) && (t.color = ""), i(t.border) && (t.border = ""), i(t.width) && (t.width = ""), i(t.theme) && (t.theme = "inherit"), i(t.variant) && (t.variant = "outlined"), i(t.size) && (t.size = "large");
  const o = y(t, s), { href: f, icon: a, size: m, color: z, theme: g, variant: p, gradient: c, children: l, text: h, ...u } = o, e = {};
  return c && (e.backgroundImage = c, e.borderColor = "transparent"), ["color", "border", "width"].forEach((n) => {
    o[n] && (e[n] = o[n]);
  }), /* @__PURE__ */ b(
    x,
    {
      color: g,
      href: f,
      target: "_blank",
      variant: p,
      style: e,
      size: m,
      className: "action-button",
      ...u,
      children: [
        !!a && /* @__PURE__ */ w("i", { className: a }),
        h || l
      ]
    }
  );
}
s.propTypes = {
  href: r.string.isRequired,
  children: r.any,
  gradient: r.string,
  color: r.string,
  icon: r.string,
  border: r.string,
  text: r.string,
  theme: r.string,
  variant: r.string,
  size: r.string,
  width: r.string
};
const T = v(s, { name: "ActionButton" });
export {
  T as default
};
