import { jsx as t, jsxs as c, Fragment as v } from "react/jsx-runtime";
import { isEmpty as A, groupBy as f } from "lodash-es";
import { useTranslation as h } from "react-i18next";
import { ActivitySummaryRow as a } from "../row/ActivitySummaryRow.js";
import { ActivitySummaryStack as y } from "./ActivitySummaryStack.js";
import { B3 as x, L1Bold as p } from "../../../../components/typography.generated.js";
const j = ({ summaryArray: r, networkId: o, hideComponent: d, ...s }) => {
  const { t: i } = h();
  if (A(r))
    return /* @__PURE__ */ t(y, { ...s, children: /* @__PURE__ */ t(x, { color: "text-secondary", textAlign: "center", py: 1, children: i("sendAndReceiveActivity.noBalanceChange") }) });
  const { send: l, receive: m } = f(r, (e) => e.sent ? "send" : "receive");
  return /* @__PURE__ */ c(y, { ...s, children: [
    l && /* @__PURE__ */ c(v, { children: [
      /* @__PURE__ */ t(p, { color: "text-secondary", children: i("sendAndReceiveActivity.send") }),
      l.map((e, n) => /* @__PURE__ */ t(a, { summary: e, networkId: o, hideComponent: d }, `send-${n}-${e.asset.type}`))
    ] }),
    m && /* @__PURE__ */ c(v, { children: [
      /* @__PURE__ */ t(p, { color: "text-secondary", children: i("sendAndReceiveActivity.receive") }),
      m.map((e, n) => /* @__PURE__ */ t(a, { summary: e, networkId: o, hideComponent: d }, `send-${n}-${e.asset.type}`))
    ] })
  ] });
};
export {
  j as SendAndReceiveActivity
};
