import { jsx as d } from "react/jsx-runtime";
import { prettifyTokenAmount as e, ensureDecimals as n } from "@argent/x-shared";
import { useToken as f } from "../../features/providers/TokenProvider.js";
import { Text as p } from "@chakra-ui/react";
import { useTranslation as k } from "react-i18next";
const b = ({ txFee: t, networkId: s, ...m }) => {
  const { t: r } = k(), { tokenAddress: i, currentAmount: a, maximumAmount: u } = t, o = f({ address: i, networkId: s });
  if (!o)
    return null;
  const l = e({
    amount: a,
    decimals: n(o.decimals)
  }), c = e({
    amount: u,
    decimals: n(o.decimals),
    symbol: o.symbol
  });
  return /* @__PURE__ */ d(p, { textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "nowrap", ...m, children: r("backendSessionTokenInfo.outOf", {
    displayCurrentAmount: l,
    displayMaximumAmount: c
  }) });
};
export {
  b as BackendSessionTokenInfo
};
