"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),v=require("lodash-es"),A=require("react-i18next"),l=require("../row/ActivitySummaryRow.cjs"),u=require("./ActivitySummaryStack.cjs"),n=require("../../../../components/typography.generated.cjs"),x=({summaryArray:r,networkId:s,hideComponent:d,...o})=>{const{t:i}=A.useTranslation();if(v.isEmpty(r))return e.jsx(u.ActivitySummaryStack,{...o,children:e.jsx(n.B3,{color:"text-secondary",textAlign:"center",py:1,children:i("sendAndReceiveActivity.noBalanceChange")})});const{send:a,receive:y}=v.groupBy(r,t=>t.sent?"send":"receive");return e.jsxs(u.ActivitySummaryStack,{...o,children:[a&&e.jsxs(e.Fragment,{children:[e.jsx(n.L1Bold,{color:"text-secondary",children:i("sendAndReceiveActivity.send")}),a.map((t,c)=>e.jsx(l.ActivitySummaryRow,{summary:t,networkId:s,hideComponent:d},`send-${c}-${t.asset.type}`))]}),y&&e.jsxs(e.Fragment,{children:[e.jsx(n.L1Bold,{color:"text-secondary",children:i("sendAndReceiveActivity.receive")}),y.map((t,c)=>e.jsx(l.ActivitySummaryRow,{summary:t,networkId:s,hideComponent:d},`send-${c}-${t.asset.type}`))]})]})};exports.SendAndReceiveActivity=x;
