import{bx as g,u as f,r as l,f as S,bv as C,j as i,s as b,by as j}from"./index-C1DmWO_C.js";import{S as x}from"./storage-connector-BuEuJyVA.js";import{R as y}from"./RedirectInProject-DyNX4L_7.js";import{a as I}from"./index-DDgDmsNg.js";import{g as T,a as D}from"./utils-DospTenN.js";import{S as P}from"./StorageConnectorsForm-hi7kKabn.js";import"./FileUploaderButton-BtxUzlTS.js";import"./zipObj-D8EtfWld.js";import"./useScreenWithScroll-zcr7TMGO.js";import"./Project-CpwJZ-CK.js";import"./alertManagerConfig.selectors-B9ELaxCY.js";import"./index-Dub34MAX.js";import"./symmetricDifference-B3GPGppJ.js";import"./git-C8OLuEaG.js";import"./NoData-Y_e6mfNf.js";import"./useCopyToClipboard-v9FBn9Nz.js";import"./Anchor-DFXOcnPw.js";import"./flip-DcJ5-1Gs.js";const K=()=>{g(j.createStorageConnector);const{protocol:t,id:r,fsId:o}=f(),[e,{error:n,isLoading:p,isSuccess:m}]=I(),c=Object.keys(x).includes(String(t))?t:void 0,u=l.useCallback(s=>{const{storageConnectorType:a}=s,d=S(C("type",D(a)),T(a))(s);e({pId:+r,fsId:+o,data:d})},[e,r,o]);return m?i.jsx(y,{to:b.storageConnector.list,params:{fsId:o}}):i.jsx(P,{error:n,initialProtocol:c,isLoading:p,isDisabled:!o,onSubmit:u})};export{K as default};
