import{B as s,Ge as E,Q as m,Rg as R,Sc as l,Sf as S,Wc as d,Y as h,aa as p,jg as v,lf as f,n,pg as u,wg as I}from"./chunk-WOSO3QBJ.js";import{i as c}from"./chunk-C2HMJUB7.js";var e=class e{authHttp=p(d);restService=p(u);restExtractor=p(v);serverService=p(I);importVideo(t){let r=e.BASE_VIDEO_IMPORT_URL,a=S(t);return this.authHttp.post(r,a).pipe(s(i=>this.restExtractor.handleError(i)))}getMyVideoImports(t,r,a){let i=new l;if(i=this.restService.addRestGetParams(i,t,r),a){let o=this.restService.parseQueryStringFilter(a,{videoChannelSyncId:{prefix:"videoChannelSyncId:"},targetUrl:{prefix:"targetUrl:"}});i=this.restService.addObjectParams(i,o)}return this.authHttp.get(R.BASE_USERS_URL+"me/videos/imports",{params:i}).pipe(m(o=>this.extractVideoImports(o)),s(o=>this.restExtractor.handleError(o)))}deleteVideoImport(t){return this.authHttp.delete(e.BASE_VIDEO_IMPORT_URL+t.id).pipe(s(r=>this.restExtractor.handleError(r)))}cancelVideoImport(t){return this.authHttp.post(e.BASE_VIDEO_IMPORT_URL+t.id+"/cancel",{}).pipe(s(r=>this.restExtractor.handleError(r)))}extractVideoImports(t){return this.serverService.getServerLocale().pipe(n(r=>(t.data.forEach(a=>a.state.label=E(a.state.label,r)),t)))}};c(e,"BASE_VIDEO_IMPORT_URL",f.apiUrl+"/api/v1/videos/imports/"),c(e,"\u0275fac",function(r){return new(r||e)}),c(e,"\u0275prov",h({token:e,factory:e.\u0275fac}));var x=e;export{x as a};
/**i18n:b44b17e72e4b9ae03afb92709eafda64a985c0c8f0453c865708cceafe42f927*/
//# sourceMappingURL=chunk-L2FPJ5HM.js.map
