import e from"@babel/runtime/helpers/defineProperty";import{jsxs as l,jsx as t}from"react/jsx-runtime";import o from"classnames";import{TableCell as a,Tooltip as i,Checkbox as r,Typography as s}from"@material-ui/core";import{EXPANDED_WELL_NAME_WIDTH as c,ColumnType as m}from"../../../../constants.js";import{SubjectWellMark as n}from"../../components/SubjectWellMark/SubjectWellMark.js";import{PAGE_NAME as d}from"../types.js";import p from"../../components/OffsetWellsTableRow/OffsetWellsTableRow.module.css.js";var f=function(f){var h,b,u,W=f.data,k=f.isSubjectWell,x=f.borderStyle,w=f.wellNameStyle,N=f.isWellNameExpand,j=f.columnsMap,v=f.checkboxTooltipText,y=f.isViewOnly,C=f.isLimitedOffsetWells,g=f.isChecked,O=f.handleChangeCheckbox,S=f.isOverFlowWellName,T=f.wellName,M=f.truncWellName;return l(a,{"data-testid":"".concat(d,"_well"),className:o(p.bodyCell,p.wellNameCell,x,w),style:N?{minWidth:c,flex:0}:{minWidth:(null===(h=j.get(m.name))||void 0===h?void 0:h.minWidth)||0,flex:(null===(b=j.get(m.name))||void 0===b?void 0:b.flex)||0},children:[k&&t(n,{className:o(p.subjectWellMark)}),!k&&t(i,{title:v,placement:"bottom-start",classes:{tooltipPlacementBottom:p.checkboxTooltip},children:t("div",{onClick:function(e){return e.stopPropagation()},children:t(r,{"data-testid":"".concat(d,"_checkbox"),size:"medium",checked:g,classes:{disabled:p.checkboxDisabled},disabled:y||C&&!W.checked,onChange:function(e){return O(e.target.checked)}})})}),t(i,{title:S?T:"",children:t(s,{variant:"body2",className:o(p.wellNameCursor,(u={},e(u,p.cellDataViewOnly,k),e(u,p.wellNamePreWrap,S),u)),children:S?M:T})})]})};export{f as WellNameCell};
//# sourceMappingURL=WellNameCell.js.map
