"use strict";var e=require("react"),r=require("lodash"),s=require("prop-types"),o=require("../ComparisonRow.js"),t=require("./utils.js"),u=require("react/jsx-runtime"),i=function(s){var i=s.rowKey,m=s.summaries,n=s.sort,a=s.order,l=s.showBar,y=s.viewMode,d=m.designSummary,p=m.actualSummary,w=m.predictionSummary,c=d&&d[i]||{},g=p&&p[i]||{},v=e.useMemo((function(){return t.getElementInfo({designElements:c,actualElements:g,rowKey:i,predictionSummary:w})}),[c,g,i,w]),M=v.elemMax,h=v.elemAmount,q=n?r.sortBy(h,n):h;return(q=a&&"desc"===a?r.reverse(q):q).map((function(e){return u.jsx(o,{rowKey:i,label:e.key,elemKey:e.key,elemMax:M,summaries:m,showBar:l,viewMode:y,unitType:e.unitType},e.key)}))};i.propTypes={rowKey:s.string,sort:s.string,order:s.string,summaries:s.shape,showBar:s.bool,viewMode:s.string},i.defaultProps={rowKey:"",sort:null,order:null,summaries:{},showBar:!0,viewMode:null},module.exports=i;
