import e from"@babel/runtime/helpers/defineProperty";import{memo as r}from"react";import t from"prop-types";import{makeStyles as o,TextField as p}from"@material-ui/core";import n from"@material-ui/lab/Autocomplete";import{jsx as a}from"react/jsx-runtime";function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function c(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var l=o({root:{marginLeft:10,marginTop:8,width:130},paper:{maxHeight:400,width:320,boxShadow:"0px 5px 5px -3px rgb(0 0 0 / 20%), 0px 8px 10px 1px rgb(0 0 0 / 14%), 0px 3px 14px 2px rgb(0 0 0 / 12%)"}});function u(e){var r=e.wells,t=e.subjectWell,o=e.onChange,i=l();return a(n,{"data-testid":"".concat("SubjectWellSearch","_autocomplete"),openOnFocus:!0,options:r,disableClearable:!0,blurOnSelect:!0,classes:{root:i.root,paper:i.paper},value:t,getOptionLabel:function(e){return e.name},renderInput:function(e){return a(p,c(c({},e),{},{label:"Subject Well"}))},onChange:function(e,r){o(r.id)}})}u.propTypes={wells:t.arrayOf(t.shape({})).isRequired,subjectWell:t.shape({}),onChange:t.func.isRequired},u.defaultProps={subjectWell:null};var s=r(u);export{s as default};
