import { jsxs as p, jsx as e } from "react/jsx-runtime";
import "../constants/chains.js";
import "ethers";
import "../logger.js";
import { cn as d } from "../utils/cn.js";
import { TOKENS_DATA as I } from "../constants/tokens.js";
import { CHAIN_ICONS as N, UNKNOWN_ICON as h, ASSET_ICONS as x } from "../icons/index.js";
import { Icon as t } from "./Icon.js";
const n = 4, _ = ({
  token: o,
  className: c,
  size: r = "md",
  hideChainIcon: s
}) => {
  const m = !o.isIntent && !s, i = o.symbol.toLowerCase(), a = N[o.blockchain] ?? h, l = x[i] ?? I[i]?.icon;
  return /* @__PURE__ */ p("div", { className: "relative flex items-center", children: [
    /* @__PURE__ */ e(
      t,
      {
        icon: l,
        label: o.name,
        size: r === "md" ? 28 : 40
      }
    ),
    m && /* @__PURE__ */ e(
      "div",
      {
        className: d(
          "absolute right-[-4px] h-[16px] w-[16px] flex items-center justify-center overflow-hidden border-2",
          r === "md" ? "top-[19px]" : "top-[27px]",
          c
        ),
        style: { borderRadius: n },
        children: /* @__PURE__ */ e(
          t,
          {
            size: 16,
            radius: n,
            icon: a,
            label: o.chainName
          }
        )
      }
    )
  ] });
};
export {
  _ as TokenIcon
};
//# sourceMappingURL=TokenIcon.js.map
