import{bC as g,u as l,r as C,p as S,bA as f,j as a,s as b,bD as j}from"./index-dP1W1_bd.js";import{S as x}from"./storage-connector-BuEuJyVA.js";import{R as y}from"./RedirectInProject-CQTAnW03.js";import{a as I}from"./index-DG59sqU_.js";import{g as T,a as D}from"./utils-3BV3J1PE.js";import{S as P}from"./StorageConnectorsForm-ChdFvoOV.js";import"./useDownload-C3yCvYJa.js";import"./useProject-CXVt1xnE.js";import"./length-BzpOfCdE.js";import"./FileUploaderButton-frSujVRY.js";import"./uniq-98MdbBvs.js";import"./uniqBy-6mvKp2Ip.js";import"./dumbPluralize-CcxDsNiu.js";import"./zipObj-DEkcXp9d.js";import"./useScreenWithScroll-zcr7TMGO.js";import"./Project-CsYwwOpN.js";import"./ButtonWithRole-CF64B_Or.js";import"./alertManagerConfig.selectors-B_R5cvew.js";import"./__-BIxbRvwe.js";import"./complement-D_Q2yZKt.js";import"./index-MHdXqM53.js";import"./CardActionButton-BtCnEqTK.js";import"./utils-UGwNsahk.js";import"./useKeyPress-OcDHupLZ.js";import"./symmetricDifference-mJT60wVA.js";import"./git-C8OLuEaG.js";import"./NoData-DLZ_8GEo.js";import"./useCopyToClipboard-DTBM3H3Z.js";import"./Anchor-B_lGyhCa.js";import"./flip-etQOAW1x.js";const ro=()=>{g(j.createStorageConnector);const{protocol:t,id:r,fsId:o}=l(),[e,{error:p,isLoading:m,isSuccess:n}]=I(),c=Object.keys(x).includes(String(t))?t:void 0,u=C.useCallback(s=>{const{storageConnectorType:i}=s,d=S(f("type",D(i)),T(i))(s);e({pId:+r,fsId:+o,data:d})},[e,r,o]);return n?a.jsx(y,{to:b.storageConnector.list,params:{fsId:o}}):a.jsx(P,{error:p,initialProtocol:c,isLoading:m,isDisabled:!o,onSubmit:u})};export{ro as default};
