"use client";
import { j as o } from "../../../node_modules/.pnpm/react@19.1.0/node_modules/react/jsx-runtime.mjs";
import "react";
import { ReactComponent as C } from "../../assets/images/DotIcon.svg.mjs";
import { getDecimalNumberFromAmount as h, parseNumIntoReadableString as m, decimalUnits as d } from "../../../node_modules/.pnpm/@hyperplay_utils@0.3.18/node_modules/@hyperplay/utils/dist/index.es.mjs";
import { CardGeneric as v } from "../CardGeneric/index.mjs";
import u from "../Sticker/index.mjs";
import e from "./index.module.scss.mjs";
function R({
  rewardImage: c,
  rewardType: f,
  claimsLeft: i,
  decimals: l,
  i18n: p = {
    claimsLabel: "Claims left"
  },
  isLoading: t = !1,
  rewardName: a,
  amountPerUser: n
}) {
  let r = a;
  if (l == null && (l = 0), n) {
    let s;
    n && l !== void 0 && l !== null ? s = h(
      n,
      l
    ).toString() : s = m({
      num: n,
      units: d,
      minValue: "1",
      maxValue: "9999"
    });
    const x = m({
      num: s,
      units: d,
      minValue: "0.0001",
      maxValue: "9999"
    });
    f === "ERC721" ? r = a : r = `+${x} ${a}`;
  }
  return /* @__PURE__ */ o.jsx(
    v,
    {
      image: c,
      genericClassNames: {
        root: t ? e.loading : "",
        image: e.rewardImage,
        body: t ? e.loading : e.rewardsBody
      },
      showGradientBorderAndShadow: t,
      className: e.cardBase,
      children: /* @__PURE__ */ o.jsx("div", { className: e.content, children: /* @__PURE__ */ o.jsxs("div", { className: e.stickers, children: [
        t || !r ? null : /* @__PURE__ */ o.jsx(
          u,
          {
            styleType: "neutral",
            dimension: "default",
            variant: "filledStrong",
            children: r
          }
        ),
        i != null && !t ? /* @__PURE__ */ o.jsxs(
          u,
          {
            styleType: "neutral",
            dimension: "default",
            withDot: { dotColor: "success", dotIcon: C },
            children: [
              p.claimsLabel,
              ": ",
              i
            ]
          }
        ) : null
      ] }) })
    }
  );
}
export {
  R as default
};
//# sourceMappingURL=index.mjs.map
