"use strict";const e=require("react/jsx-runtime"),l=require("react"),u=require("@mui/material/OutlinedInput"),o=require("@mui/material/InputAdornment"),d=require("@mui/material/IconButton"),p=require("@mui/icons-material/SearchRounded"),m=require("@mui/icons-material/Clear"),r=({placeholder:s,value:t,onChange:n})=>{const i=()=>{n("")},c=l.useMemo(()=>t!=="",[t]);return e.jsx(u,{size:"small",autoComplete:"off",type:"text",placeholder:s??"Search",startAdornment:e.jsx(o,{position:"start",children:e.jsx(p,{color:"primary"})}),endAdornment:c?e.jsx(o,{position:"end",children:e.jsx(d,{size:"small",onClick:i,edge:"end",children:e.jsx(m,{fontSize:"small"})})}):void 0,value:t,onChange:a=>{n(a.target.value)},sx:{flexBasis:"500px",display:"flex",boxShadow:"none",minWidth:{md:400,lg:400,xl:500}},inputProps:{autoCorrect:"off",autoComplete:"off"}})};r.displayName="SearchInput";exports.SearchInput=r;
