"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react-virtualized"),r=require("@material-ui/core"),i=require("../MetricsSelect/MetricsSelect.js"),s=require("../OffsetWellsTableHead/OffsetWellsTableHead.module.css.js");exports.MetricsHeaderCells=function(l){var n=l.columnsWithDict,c=l.metricsKeys,a=l.sortBy,o=l.sortDirection,u=l.isMetricsMenuOpen,d=l.onSort,f=l.onUpdateMetricsKey,m=l.setIsMetricsMenuOpen;return e.jsx(e.Fragment,{children:c.map((function(l){var M=n.find((function(e){return e.key===l})),h=(null==M?void 0:M.minWidth)||0,b=(null==M?void 0:M.flex)||0;return e.jsx(r.TableCell,{"data-testid":"".concat("OffsetWellsTableHead","_").concat(l),className:s.headCell,style:{minWidth:h,flex:b},children:e.jsx(r.TableSortLabel,{title:u?"":"Sort",active:a===l,direction:a===l&&o===t.SortDirection.DESC?"desc":"asc",classes:{root:s.headerLabel},onClick:function(){return d(l)},children:e.jsx(i.MetricsSelect,{isTooltipVisible:c.length>1,currentValue:l,metricsKeys:c,onChange:function(e){return f(l,e)},setIsMenuOpen:m})})},l)}))})};
//# sourceMappingURL=MetricsHeaderCells.js.map
