"use strict";var e=require("react/jsx-runtime"),l=require("react"),r=require("classnames"),t=require("../../../components/Table/TableCell/TableCell.js"),n=require("@material-ui/core"),i=require("../../Checkbox/Checkbox.js"),s=require("./helpers/columns.js"),a=require("./PadTableRow.scss.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=d(r);module.exports=function(r){var d=r.data,u=r.handleSelectPad,o=r.handleSelectWellId,h=r.isExpanded,m=r.isMainPad,f=r.selectedOffsetWellIds,x=r.searchText,b=l.useMemo((function(){var e=d.wells.every((function(e){return f.includes(e.id)}));return{indeterminate:d.wells.some((function(e){return f.includes(e.id)}))&&!e,checked:e}}),[d.wells,f]),j=b.indeterminate,C=b.checked;return e.jsx(n.TableRow,{children:s.COLUMNS.map((function(l,r){var n=l.title,s=l.render,b=l.width;return e.jsx(t.TableCell,{className:c.default(a.cell,m?a.blueCell:a.greyCell),style:{width:b},children:e.jsxs("div",{className:a.cellContent,children:[!r&&!m&&e.jsx(i.Checkbox,{size:"medium",onChange:function(e){return u(d.id,e)},checked:C,indeterminate:j}),e.jsx("div",{children:s({data:d,isSelected:C||j,selectedOffsetWellIds:f,handleSelectWellId:o,isExpanded:h,isMainPad:m,searchText:x})})]})},n)}))})};
//# sourceMappingURL=PadTableRow.js.map
