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-d6499a22.js";import{R as y}from"./RedirectInProject-0591395a.js";import{g as I,a as D}from"./utils-2832fe88.js";import{S as P}from"./StorageConnectorsForm-8176d809.js";import"./useCurrentProject-b23444be.js";import"./useProject-0d0fdeb3.js";import"./FileUploaderButton-c4f1b533.js";import"./useDownload-7167ff3b.js";import"./props-01648cd9.js";import"./zipObj-e651182a.js";import"./Project-92985c5d.js";import"./index-ddf2d065.js";import"./PrimaryIconButton-fd23494f.js";import"./dumbPluralize-86a9b9d6.js";import"./git-d9965c1a.js";import"./NoData-789df290.js";import"./index-da50fbe6.js";import"./file-utils-b5704e1c.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};
