/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import e from"../../request.js";import{parseUrl as t,asValidOptions as o,encode as r}from"../utils.js";async function i(i,n,s){const a=t(i),m=n.toJSON(),u=o(a.query,{query:r({...m,f:"json"}),...s,authMode:"immediate",method:"post"}),d=`${a.path}/create`,{data:f}=await e(d,u),{versionName:p,versionGuid:c,...v}=f.versionInfo;return{...v,versionIdentifier:{name:p,guid:c}}}export{i as createVersion};
