import{bx as l,by as u,u as C,gf as b,r as f,p as j,i$ as x,bu as y,j0 as S,j as D}from"./index-Cc-6WbPt.js";import{b as T}from"./index-B586lZFk.js";import{D as I}from"./DataSourceCreate-B15ZtAYK.js";import"./useScreenWithScroll-zcr7TMGO.js";import"./index-DeWhk8_Z.js";import"./flip-DZcY_k0G.js";import"./FeaturesForm-DS-x18mi.js";import"./sum-Bb5aTXea.js";import"./countBy-Ds8vJrZu.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=j(y("type",S(i)),x(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};
