import{bx as l,by as u,u as C,gf as b,r as f,p as x,iZ as y,bu as S,i_ as j,j as D}from"./index-ljTaFLaB.js";import{b as T}from"./index-FNYIAcGm.js";import{D as I}from"./DataSourceCreate-BqPfrtJC.js";import"./useScreenWithScroll-zcr7TMGO.js";import"./index-WyeuJRlK.js";import"./flip-DVsL-10L.js";import"./FeaturesForm-CmOULT7K.js";import"./sum-DmZpJiQ9.js";import"./countBy-Bp9Idv1G.js";const R=()=>{l(u.createStorageConnector);const{protocol:r,id:e,fsId:t}=C(),[a,{error:n,isLoading:p}]=T(),m=Object.keys(b).includes(String(r))?r:void 0,c=f.useCallback((s,o)=>{const{storageConnectorType:i}=s,d=x(S("type",j(i)),y(i))(s);a({pId:+e,fsId:+t,data:d}).unwrap().then(g=>{o==null||o(g)})},[a,e,t]);return D.jsx(I,{error:n,initialProtocol:m,isSaving:p,isDisabled:!t,onSubmit:c})};export{R as default};
