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