import{bx as l,by as u,u as C,gk as b,r as f,p as j,jy as y,bu as x,jz as S,j as D}from"./index-_eM6l4Nf.js";import{b as T}from"./index-CZNL5XBB.js";import{D as I}from"./DataSourceCreate-DckBCuf3.js";import"./useScreenWithScroll-zcr7TMGO.js";import"./form-CMT9TYED.js";import"./flip-EX8WycHt.js";import"./FeaturesForm-Cft0Qak8.js";import"./sum-D-ETrf05.js";import"./countBy-DF_zfOSq.js";const O=()=>{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(x("type",S(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{O as default};
