import{aX as g,u as l,ib as C,fq as S,r as f,W as j,cT as b,j as i,e as x,aY as T}from"./index-4a12e52c.js";import{R as y}from"./RedirectInProject-cc1d89e5.js";import{g as I,a as D}from"./utils-5c74f234.js";import{S as P}from"./StorageConnectorsForm-400967fe.js";import"./useCurrentProject-9bb1c6a4.js";import"./useProject-04893095.js";import"./FileUploaderButton-546aa096.js";import"./useDownload-e87fcc63.js";import"./props-d543ba26.js";import"./zipObj-078ddbe7.js";import"./Project-7ea6ff24.js";import"./index-91a459dc.js";import"./PrimaryIconButton-0a56fae1.js";import"./dumbPluralize-86a9b9d6.js";import"./git-d9965c1a.js";import"./NoData-430a62e8.js";import"./index-1b686e0d.js";import"./file-utils-37d8d953.js";import"./alertManagerConfig.selectors-c57f191b.js";const H=()=>{g(T.createStorageConnector);const{protocol:o,id:r,fsId:t}=l(),[e,{error:n,isLoading:p,isSuccess:m}]=C(),c=Object.keys(S).includes(String(o))?o:void 0,u=f.useCallback(s=>{const{storageConnectorType:a}=s,d=j(b("type",D(a)),I(a))(s);e({pId:+r,fsId:+t,data:d})},[e,r,t]);return m?i.jsx(y,{to:x.storageConnector.list,params:{fsId:t}}):i.jsx(P,{error:n,initialProtocol:c,isLoading:p,isDisabled:!t,onSubmit:u})};export{H as default};
