import{aY as g,u as l,ia as C,fu as S,r as f,W as j,cW as b,j as i,b as x,aZ as y}from"./index-ea7817a2.js";import{R as I}from"./RedirectInProject-7cd1be4f.js";import{g as T,a as D}from"./utils-297973b8.js";import{S as P}from"./StorageConnectorsForm-66d28a35.js";import"./useCurrentProject-0132f110.js";import"./useProject-77619fff.js";import"./FileUploaderButton-495e1c87.js";import"./useDownload-09eaf3eb.js";import"./props-31bc4ea7.js";import"./zipObj-08c84ab1.js";import"./Project-80a71be4.js";import"./index-43e7382e.js";import"./PrimaryIconButton-fe990c52.js";import"./dumbPluralize-86a9b9d6.js";import"./git-d9965c1a.js";import"./NoData-8733f606.js";import"./index-8f672200.js";import"./file-utils-a5f053e8.js";import"./alertManagerConfig.selectors-c57f191b.js";const H=()=>{g(y.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)),T(a))(s);e({pId:+r,fsId:+t,data:d})},[e,r,t]);return m?i.jsx(I,{to:x.storageConnector.list,params:{fsId:t}}):i.jsx(P,{error:n,initialProtocol:c,isLoading:p,isDisabled:!t,onSubmit:u})};export{H as default};
