import{bb as g,u as f,r as l,f as S,b9 as C,j as i,q as b,bc as j}from"./index-CK33qGU_.js";import{S as x}from"./storage-connector-BuEuJyVA.js";import{R as y}from"./RedirectInProject-DugBRkJr.js";import{a as I}from"./index-DnFHOcek.js";import{g as T,a as D}from"./utils-LzNCUvhl.js";import{S as P}from"./StorageConnectorsForm-wdrPaifm.js";import"./useDownload-hrjXceJg.js";import"./useProject-BzBQtp4J.js";import"./length-fOfC3W0h.js";import"./FileUploaderButton-Bppadu35.js";import"./dumbPluralize-CcxDsNiu.js";import"./props-DsctD44O.js";import"./zipObj-DQ8OxaYj.js";import"./useScreenWithScroll-zcr7TMGO.js";import"./Project-j3KdDsvH.js";import"./ButtonWithRole-NHXEosto.js";import"./alertManagerConfig.selectors-BX2JGYEL.js";import"./__-BIxbRvwe.js";import"./complement-M2aUPqXA.js";import"./PrimaryIconButton-DQUEhx3G.js";import"./git-C8OLuEaG.js";import"./NoData-CuLyR2Bg.js";import"./useCopyToClipboard-_4vnCVip.js";import"./Anchor-HBBcGDu5.js";import"./flip-BOjSlIdl.js";const Z=()=>{g(j.createStorageConnector);const{protocol:t,id:r,fsId:o}=f(),[e,{error:p,isLoading:m,isSuccess:n}]=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 n?i.jsx(y,{to:b.storageConnector.list,params:{fsId:o}}):i.jsx(P,{error:p,initialProtocol:c,isLoading:m,isDisabled:!o,onSubmit:u})};export{Z as default};
