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