"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),M=require("@argent/x-shared"),s=require("@argent/x-shared/simulation"),o=require("@chakra-ui/react"),i=require("react"),D=require("react-i18next"),F=require("../../TransactionReviewAction.cjs"),I=require("../icon/ActivityIcon.cjs"),N=require("./ActivityAdditionalDetails.cjs"),O=require("../summary/SendAndReceiveActivity.cjs"),P=require("../../../../components/CellStack.cjs"),l=require("../../../../components/typography.generated.cjs"),w=require("../../../../utilities/date/index.cjs"),z=({activity:e,networkId:n,hideComponent:r,children:p,locales:h,...q})=>{var m,d,A;const{t:S}=D.useTranslation(),c=e.type===s.NativeActivityTypeNative,b=s.getAnyActivityTitle(e,S),a=c&&((m=e.meta)==null?void 0:m.subtitle),y=i.useMemo(()=>s.isRejectOnChainActivity(e),[e]),f=i.useMemo(()=>s.isUpgradeActivity(e),[e]),v=i.useMemo(()=>s.isSwapActivity(e),[e]),u=(c&&((d=e.meta)==null?void 0:d.icon)||y||f)&&!v,R=c&&((A=e.meta)==null?void 0:A.investment),T=i.useMemo(()=>{var g;const x=(g=e.actions)==null?void 0:g.map(j=>t.jsx(F.TransactionReviewAction,{action:j,networkId:n,hideComponent:r},`review-${j.name}`));return M.ensureArray(x).length?t.jsx(o.Flex,{direction:"column",gap:1,children:x}):null},[e.actions,R,n]);return t.jsxs(P.CellStack,{...q,children:[t.jsxs(o.Flex,{alignItems:"center",w:"full",gap:3,pb:3,pl:u?1:3,pr:3,children:[u&&t.jsx(I.ActivityIcon,{size:12,fontSize:"xl",activity:e,networkId:n,preferMetaIcon:!0}),t.jsxs(o.Flex,{direction:"column",gap:.5,children:[t.jsx(l.H4,{children:b}),a&&t.jsx(l.P3,{fontWeight:"semibold",color:"text-secondary",children:a}),t.jsx(l.P3,{fontWeight:"semibold",color:"text-secondary",children:w.formatDateTime(e.submitted,h)})]})]}),p,t.jsx(O.SendAndReceiveActivity,{summaryArray:e.transferSummary,networkId:n,hideComponent:r}),t.jsx(N.ActivityAdditionalDetails,{activity:e,networkId:n,hideComponent:r}),T]})};exports.ActivityDetails=z;
