import{bw as l,bx as u,u as C,gc as b,r as f,p as x,iX as S,bt as j,iY as y,j as D}from"./index-46ma1THH.js";import{b as T}from"./index-CEcdCfcT.js";import{D as I}from"./DataSourceCreate-Da5yIYyi.js";import"./useScreenWithScroll-zcr7TMGO.js";import"./index-CcWUz40c.js";import"./flip-szqi4alz.js";import"./FeaturesForm-CufhwCoR.js";import"./sum-DF_JiBHo.js";import"./countBy-mtn2Iagr.js";const R=()=>{l(u.createStorageConnector);const{protocol:r,id:e,fsId:t}=C(),[a,{error:n,isLoading:p}]=T(),c=Object.keys(b).includes(String(r))?r:void 0,m=f.useCallback((s,o)=>{const{storageConnectorType:i}=s,d=x(j("type",y(i)),S(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:c,isSaving:p,isDisabled:!t,onSubmit:m})};export{R as default};
