import{B as o,Jh as U,Q as d,Y as l,aa as s,bf as R,bg as f,bh as v,gh as O,hd as u,kd as I,n as E,oh as x,uf as S}from"./chunk-6YFOH76E.js";import{c as h,i as p}from"./chunk-QQ7SJNXU.js";var e=class e{authHttp=s(I);restService=s(O);restExtractor=s(v);serverService=s(x);importVideo(t){let r=e.BASE_VIDEO_IMPORT_URL,a=f(t);return this.authHttp.post(r,a).pipe(o(c=>this.restExtractor.handleError(c)))}listMyVideoImports(t){let m=t,{pagination:r,sort:a}=m,c=h(m,["pagination","sort"]),i=new u;return i=this.restService.addRestGetParams(i,r,a),i=this.restService.addObjectParams(i,c),this.authHttp.get(U.BASE_USERS_URL+"me/videos/imports",{params:i}).pipe(d(n=>this.extractVideoImports(n)),o(n=>this.restExtractor.handleError(n)))}deleteVideoImport(t){return this.authHttp.delete(e.BASE_VIDEO_IMPORT_URL+t.id).pipe(o(r=>this.restExtractor.handleError(r)))}cancelVideoImport(t){return this.authHttp.post(e.BASE_VIDEO_IMPORT_URL+t.id+"/cancel",{}).pipe(o(r=>this.restExtractor.handleError(r)))}retryVideoImport(t){return this.authHttp.post(e.BASE_VIDEO_IMPORT_URL+t.id+"/retry",{}).pipe(o(r=>this.restExtractor.handleError(r)))}extractVideoImports(t){return this.serverService.getServerLocale().pipe(E(r=>(t.data.forEach(a=>a.state.label=R(a.state.label,r)),t)))}};p(e,"BASE_VIDEO_IMPORT_URL",S.apiUrl+"/api/v1/videos/imports/"),p(e,"\u0275fac",function(r){return new(r||e)}),p(e,"\u0275prov",l({token:e,factory:e.\u0275fac}));var V=e;export{V as a};
/**i18n:5a85df092a135682c90bae008e37ec28160e04e5f445e29af2927333ba91ffa1*/
//# sourceMappingURL=chunk-YC7KO327.js.map
