import{bG as l,bH as b,u,bn as C,r as f,p as j,kj as D,bD as S,kk as k,j as x}from"./index-DHiyXWqE.js";import{b as y}from"./index-DRFB149W.js";import{D as T}from"./DataSourceCreate-MXAjvEQL.js";import"./useScreenWithScroll-zcr7TMGO.js";import"./form-CrZPXKpD.js";import"./flip-DHDmt_vj.js";import"./index-DFvCs-SP.js";import"./sum-BEzIvRoW.js";import"./countBy-aXEkOZ3e.js";import"./FeaturesForm-D_iMRo0-.js";import"./TagsForm-BQYOp_QK.js";import"./useUpdateTdOrFvInfoService-DgmLaBNN.js";import"./index-C52WzLFZ.js";import"./randomArrayString---X8tfjV.js";import"./sort-BOLIcXtz.js";import"./index-Bat3pAWW.js";import"./Project-DwrxbZJj.js";import"./alertManagerConfig.selectors-0se_RTtj.js";import"./defineProperty-C28_3XcK.js";import"./HumanizedCronExpression-FxwdMNJF.js";import"./index-5hEKE-oe.js";import"./symmetricDifference-BqIFhGVd.js";import"./git-BLdzamrJ.js";import"./useCopyToClipboard-D6oq-fy9.js";import"./AlertForm-jO9r3OcZ.js";const Y=()=>{l(b.createStorageConnector);const{protocol:r,id:e,fsId:t}=u(),[i,{error:s,isLoading:m}]=y(),n=Object.keys(C).includes(String(r))?r:void 0,c=f.useCallback((a,o)=>{const{storageConnectorType:p}=a,d=j(S("type",k(p)),D(p))(a);i({pId:+e,fsId:+t,data:d}).unwrap().then(g=>{o==null||o(g)})},[i,e,t]);return x.jsx(T,{error:s,initialProtocol:n,isSaving:m,isDisabled:!t,onSubmit:c})};export{Y as default};
