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