import{C as s,Ie as E,S as m,Tg as R,Uc as l,Uf as S,Yc as d,Z as h,ba as p,lg as v,n,nf as f,rg as u,yg as I}from"./chunk-YAKH5Q6V.js";import{i as c}from"./chunk-DM5LJ7VI.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:197837fef124041a3f31333a5ea4afa44db030645e23ee7031f32704e8696a1d*/
//# sourceMappingURL=chunk-2CZMYB5I.js.map
