import{Af as l,C as a,D as p,E as h,Z as u,ba as H,hh as _,j as i,mh as A,nd as c,qd as N}from"./chunk-7XPKW7E5.js";import{i as E}from"./chunk-SNJLK5AI.js";var o=class o{authHttp=H(N);restService=H(A);restExtractor=H(_);sendVideoChangeRequest(e,t){let r=o.BASE_VIDEO_CHANGE_OWNERSHIP_URL+e+"/give-ownership",s={username:t};return this.authHttp.post(r,s).pipe(a(n=>this.restExtractor.handleError(n)))}listOfVideos(e,t){let r=o.BASE_VIDEO_CHANGE_OWNERSHIP_URL+"ownership",s=new c;return s=this.restService.addRestGetParams(s,e,t),this.authHttp.get(r,{params:s}).pipe(a(n=>this.restExtractor.handleError(n)))}listFromVideo(e,t){let r=o.BASE_VIDEO_CHANGE_OWNERSHIP_URL+e+"/ownership",s=new c;return s=s.set("state",t),this.authHttp.get(r,{params:s}).pipe(a(n=>this.restExtractor.handleError(n)))}acceptVideo(e,t){return i(e).pipe(h(r=>{let s=o.BASE_VIDEO_CHANGE_OWNERSHIP_URL+"ownership/"+r+"/accept";return this.authHttp.post(s,t)}),p(),a(r=>this.restExtractor.handleError(r)))}rejectVideo(e){return i(e).pipe(h(t=>{let r=o.BASE_VIDEO_CHANGE_OWNERSHIP_URL+"ownership/"+t+"/refuse";return this.authHttp.post(r,{})}),p(),a(t=>this.restExtractor.handleError(t)))}cancelVideo(e){let t=o.BASE_VIDEO_CHANGE_OWNERSHIP_URL+"ownership/"+e;return this.authHttp.delete(t).pipe(a(r=>this.restExtractor.handleError(r)))}sendChannelChangeRequest(e,t){let r=o.BASE_CHANNEL_CHANGE_OWNERSHIP_URL+e+"/give-ownership",s={username:t};return this.authHttp.post(r,s).pipe(a(n=>this.restExtractor.handleError(n)))}listOfChannels(e,t){let r=o.BASE_CHANNEL_CHANGE_OWNERSHIP_URL+"ownership",s=new c;return s=this.restService.addRestGetParams(s,e,t),this.authHttp.get(r,{params:s}).pipe(a(n=>this.restExtractor.handleError(n)))}listFromChannel(e,t){let r=o.BASE_CHANNEL_CHANGE_OWNERSHIP_URL+e+"/ownership",s=new c;return s=s.set("state",t),this.authHttp.get(r,{params:s}).pipe(a(n=>this.restExtractor.handleError(n)))}acceptChannel(e){return i(e).pipe(h(t=>{let r=o.BASE_CHANNEL_CHANGE_OWNERSHIP_URL+"ownership/"+t+"/accept";return this.authHttp.post(r,{})}),p(),a(t=>this.restExtractor.handleError(t)))}rejectChannel(e){return i(e).pipe(h(t=>{let r=o.BASE_CHANNEL_CHANGE_OWNERSHIP_URL+"ownership/"+t+"/refuse";return this.authHttp.post(r,{})}),p(),a(t=>this.restExtractor.handleError(t)))}cancelChannel(e){let t=o.BASE_CHANNEL_CHANGE_OWNERSHIP_URL+"ownership/"+e;return this.authHttp.delete(t).pipe(a(r=>this.restExtractor.handleError(r)))}};E(o,"BASE_VIDEO_CHANGE_OWNERSHIP_URL",l.apiUrl+"/api/v1/videos/"),E(o,"BASE_CHANNEL_CHANGE_OWNERSHIP_URL",l.apiUrl+"/api/v1/video-channels/"),E(o,"\u0275fac",function(t){return new(t||o)}),E(o,"\u0275prov",u({token:o,factory:o.\u0275fac}));var R=o;export{R as a};
/**i18n:8bbaae6e8f892c770558263409b04864bea4163b0f68bbe3358622c96ded4382*/
//# sourceMappingURL=chunk-JE5HHK6U.js.map
