Loading
function(e,t,l){l.d(t,{_:()=>c});var n=l(627968),r=l(64700),i=l(503698),a=l.n(i),s=l(834730),u=l(580630),o=l(777485),d=l(303519);function c(e){let{label:t,totalLineItemLabel:l,totalLineItemLabelSubText:i,totalLineItemValueSubText:c,showTotalWhenCollapsed:m=!1,lineItems:x,intervalType:f,intervalCount:p,currency:h,defaultExpanded:v=!1}=e,[j,g]=r.useState(v),N=r.useMemo(()=>{let e=x.reduce((e,t)=>e+t.amount,0),t=(0,u.$g)(e,h);return(0,u.CE)(t,f,p)},[x,h,f,p]),b=(0,n.jsxs)(o.h,{label:t,defaultExpanded:v,isDisabled:x.length<=0,onExpandedChange:g,collapsedContent:m?(0,n.jsx)(s.E,{variant:"text-md/normal",color:"text-subtle",children:N}):null,children:[x.map(e=>{let{formatWithoutRate:t,amount:l,...r}=e,i=(0,u.$g)(l,h),a=t?i:(0,u.CE)(i,f,p);return(0,n.jsx)(o.i,{value:a,...r},r.id)}),(0,n.jsx)("div",{className:d.m}),(0,n.jsx)(o.i,{label:l??t,labelSubText:i,value:N,subText:c,color:"text-strong",valueColor:"text-strong"})]});return(0,n.jsx)("div",{className:a()({[d.k]:j}),children:b})}}