!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={692:e=>{e.exports=require("@mui/icons-material/Clear")},8619:e=>{e.exports=require("@mui/material")},2015:e=>{e.exports=require("react")}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,o),a.exports}(()=>{o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t}})(),(()=>{o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};o.r(r),o.d(r,{default:()=>p});var n=o(2015),a=o.n(n),i=o(8619);const u=require("@mui/icons-material/Search");var l=o.n(u),s=o(692),c=o.n(s);const p=({term:e,onSearch:t,placeholder:o="Search..."})=>{const[r,u]=(0,n.useState)(e);(0,n.useEffect)((()=>{u(e||"")}),[e]);return a().createElement(i.TextField,{variant:"outlined",value:r,placeholder:o,slotProps:{input:{endAdornment:e?a().createElement(i.IconButton,{size:"small",onClick:()=>{u(""),t("")},sx:{position:"absolute",right:0}},a().createElement(c(),{sx:{color:"#0000008F"}})):a().createElement(l(),{sx:{mr:1,color:"#0000008F",position:"absolute",right:0}})}},onChange:e=>u(e.target.value),onKeyDown:e=>{"Enter"===e.key&&t(r)},fullWidth:!0,sx:{"& .MuiOutlinedInput-root":{height:"36px"}}})};return r})()));
//# sourceMappingURL=search-input.js.map