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