import{r as o,eO as j,j as e,B as h,eP as B,eQ as b}from"./index-C1DmWO_C.js";const g=({disabled:r,fromFile:i,isDisabledUploadButton:d,isMultiple:n,setIsOpenExplorerFromPopup:p,specifiedUploadPath:c,validExtensions:s,onCancel:t,...u})=>{const[m,a]=o.useState([]),[x,{firstRef:l,handleClick:U}]=j({setIsOpenExplorerFromPopup:p,specifiedUploadPath:c}),F=o.useCallback(()=>{const f=Object.values(l.current.files);a(f)},[l]);return e.jsxs(e.Fragment,{children:[e.jsx(h,{flexDirection:"column",children:e.jsx(B,{type:"button",disabled:r,isDisabledUploadButton:d,modeNFiles:n,currentRef:l,onHandleUpload:F,handleClick:U,validExtensions:s,maxWidth:"145px",children:`Upload ${i?"new":"job"} file`})}),e.jsx(b,{validExtensions:s,...x,...u,arrayToUpload:m,onCancel:()=>{t==null||t(),a([])}})]})},R=o.memo(g);export{R as F};
