import{i as e}from"./chunk-aKtaBQYM.js";import{Vt as t,wt as n}from"./mui-B6lh3XSP.js";import{t as r}from"./IconButton-BEBOUWhl.js";import{t as i}from"./TextField-DOdnjCrL.js";import{Vt as a,_ as o}from"./index-KVuxnkWj.js";var s=e(t(),1),c=n(),l=({placeholder:e,value:t,onChange:n,slotProps:l})=>{let u=(0,s.useRef)(null),d=()=>u.current?.click(),f=e=>{n?.(e.target.files?.[0]||null),e.target.value=``},p=e=>{e.stopPropagation(),n?.(null)};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(`input`,{ref:u,type:`file`,style:{display:`none`},onChange:f,...l?.htmlInput}),(0,c.jsx)(i,{value:t?.name??``,placeholder:e,onClick:d,slotProps:{input:{readOnly:!0,sx:{cursor:`pointer`},endAdornment:t&&(0,c.jsx)(a,{position:`end`,children:(0,c.jsx)(r,{size:`small`,edge:`end`,onClick:p,children:(0,c.jsx)(o,{fontSize:`small`})})})},htmlInput:{sx:{cursor:`pointer`}}}})]})};export{l as t};