import s from "classnames";
import a from "react";
import { InlineLoader as n } from "./accelbyte-widgets318.mjs";
import { Spinner as A, SpinnerStyle as R } from "./accelbyte-widgets154.mjs";
import "./accelbyte-widgets319.mjs";
var p = /* @__PURE__ */ ((r) => (r.FLAT = "flat", r.OUTLINED = "outlined", r.TEXT = "text", r.PLAIN = "plain", r))(p || {}), b = /* @__PURE__ */ ((r) => (r.EXTRA_SMALL = "extraSmall", r.SMALL = "small", r.MEDIUM = "medium", r.LARGE = "large", r.EXTRA_LARGE = "extraLarge", r))(b || {}), f = /* @__PURE__ */ ((r) => (r.PRIMARY = "primary", r.SECONDARY = "secondary", r.PRIMARY_WHITE = "primaryWhite", r.WHITE = "white", r.DARK = "dark", r.TEXT = "text", r.NONE = "", r))(f || {});
const T = (r, e, t) => `${r} ${t ?? ""} ${e}`, h = (r) => {
  switch (r) {
    case "INLINE":
      return /* @__PURE__ */ a.createElement(n, null);
    case "SPINNER":
      return /* @__PURE__ */ a.createElement(A, { className: s(R.inline, "mr-3") });
    default:
      return /* @__PURE__ */ a.createElement(n, null);
  }
}, W = (r) => {
  const {
    children: e,
    isFullWidth: t,
    hasOutline: d = !0,
    buttonType: m = "flat",
    buttonFontSize: c,
    buttonStyle: E = "primary",
    className: o,
    isLoading: i,
    loadingIndicator: u,
    disabled: L,
    dataQa: N,
    ...I
  } = r, l = L || i;
  return /* @__PURE__ */ a.createElement(
    "button",
    {
      className: s("button", o, T(m, E, c), {
        hasOutline: d,
        fullWidth: t,
        disabled: l
      }),
      "data-qa-id": N,
      disabled: l,
      ...I
    },
    i && h(u),
    e
  );
};
export {
  W as Button,
  b as ButtonFontSize,
  f as ButtonStyle,
  p as ButtonType
};
