import{C as a,Z as c,ba as p,gh as l,lh as H,md as n,pd as h,zf as u}from"./chunk-MOXUT4EU.js";import{i}from"./chunk-QQ7SJNXU.js";var t=class t{authHttp=p(h);restService=p(H);restExtractor=p(l);sendChangeRequest(e,r){let s=t.BASE_VIDEO_CHANGE_OWNERSHIP_URL+e+"/give-ownership",o={username:r};return this.authHttp.post(s,o).pipe(a(E=>this.restExtractor.handleError(E)))}list(e,r){let s=t.BASE_VIDEO_CHANGE_OWNERSHIP_URL+"ownership",o=new n;return o=this.restService.addRestGetParams(o,e,r),this.authHttp.get(s,{params:o}).pipe(a(E=>this.restExtractor.handleError(E)))}listFromVideo(e,r){let s=t.BASE_VIDEO_CHANGE_OWNERSHIP_URL+e+"/ownership",o=new n;return o=o.set("state",r),this.authHttp.get(s,{params:o}).pipe(a(E=>this.restExtractor.handleError(E)))}accept(e,r){let s=t.BASE_VIDEO_CHANGE_OWNERSHIP_URL+"ownership/"+e+"/accept";return this.authHttp.post(s,r).pipe(a(o=>this.restExtractor.handleError(o)))}refuse(e){let r=t.BASE_VIDEO_CHANGE_OWNERSHIP_URL+"ownership/"+e+"/refuse";return this.authHttp.post(r,{}).pipe(a(s=>this.restExtractor.handleError(s)))}cancel(e){let r=t.BASE_VIDEO_CHANGE_OWNERSHIP_URL+"ownership/"+e;return this.authHttp.delete(r).pipe(a(s=>this.restExtractor.handleError(s)))}};i(t,"BASE_VIDEO_CHANGE_OWNERSHIP_URL",u.apiUrl+"/api/v1/videos/"),i(t,"\u0275fac",function(r){return new(r||t)}),i(t,"\u0275prov",c({token:t,factory:t.\u0275fac}));var m=t;export{m as a};
/**i18n:5a85df092a135682c90bae008e37ec28160e04e5f445e29af2927333ba91ffa1*/
//# sourceMappingURL=chunk-EOPAW5Q6.js.map
