"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("prop-types"),t=require("../sharedStyles.js"),i=require("./InputText.js"),n=require("./SelectField.js"),a=require("../../../../../utils/mobileDetect.js"),l=require("../../../../../constants/drillstring.js"),s=require("../../../../../constants/casing.js"),u=require("react/jsx-runtime");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=o(r);function g(r){var o=r.component,d=r.getError,g=r.onChange,m=r.isCasing,h=t.useStyles(),p=a.isMobileDetected?6:2,c=e.useMemo((function(){return m?s.COMPONENT_FAMILIES:l.COMPONENT_FAMILIES.drilling}));return u.jsxs(u.Fragment,{children:[u.jsx(n.SelectField,{type:"family",options:c,label:"Component",value:o.family,error:d("family"),xs:p,onChangeField:g,className:h.editorHeaderCell}),u.jsx(i.InputText,{type:"outer_diameter",label:"OD",unit:"shortLength",value:o.outer_diameter,error:d("outer_diameter"),xs:p,onChangeField:g,className:h.editorHeaderCell}),u.jsx(i.InputText,{type:"inner_diameter",label:"ID",unit:"shortLength",value:o.inner_diameter,error:d("inner_diameter"),xs:p,onChangeField:g,className:h.editorHeaderCell}),u.jsx(i.InputText,{type:"linear_weight",label:"Linear Weight",unit:"massPerLength",value:o.linear_weight,error:d("linear_weight"),xs:p,onChangeField:g,className:h.editorHeaderCell}),u.jsx(i.InputText,{type:"length",label:"Length",unit:"length",value:o.length,error:d("length"),xs:p,onChangeField:g,className:h.editorHeaderCell}),u.jsx("div",{className:h.editorGap})]})}g.propTypes={component:d.default.shape({family:d.default.string,outer_diameter:d.default.number,inner_diameter:d.default.number,linear_weight:d.default.number,length:d.default.number}).isRequired,getError:d.default.func.isRequired,onChange:d.default.func.isRequired,isCasing:d.default.bool},g.defaultProps={isCasing:!1},exports.SharedEditorElements=g;
