import {
  Label
} from "./chunk-FTMB6R72.js";
import {
  InfoIconTooltip
} from "./chunk-LW7PUO7V.js";
import {
  link
} from "./chunk-FZUV52PP.js";
import {
  Icon
} from "./chunk-DMPXNHDT.js";
import {
  addCommasToDigits
} from "./chunk-HAC5YAGQ.js";

// src/components/SatoshiInputLabel.tsx
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
function SatoshiInputLabel({
  text,
  availableSats,
  showTooltip = true
}) {
  const availableSatsTooltipNode = showTooltip ? /* @__PURE__ */ jsxs(Label, { style: { display: "inline-flex", margin: "0 0 0 3px" }, children: [
    "available",
    " ",
    /* @__PURE__ */ jsx(
      InfoIconTooltip,
      {
        id: "available-balance-tooltip",
        content: [
          "Your available balance may differ from your total balance due to operational funds being held on the Lightning Network. ",
          link({
            text: "Learn more",
            externalLink: "https://docs.lightspark.com/lightspark-sdk/api-reference/types/Balances"
          })
        ]
      }
    )
  ] }) : null;
  return /* @__PURE__ */ jsxs(Label, { children: [
    /* @__PURE__ */ jsx("div", { children: text }),
    /* @__PURE__ */ jsx("div", { children: availableSats !== void 0 && /* @__PURE__ */ jsxs("div", { children: [
      /* @__PURE__ */ jsx(Icon, { name: "Satoshi", width: 8, mr: 4, verticalAlign: -2 }),
      addCommasToDigits(Math.floor(availableSats)),
      availableSatsTooltipNode
    ] }) })
  ] });
}

export {
  SatoshiInputLabel
};
