import{b as m,c as p}from"./chunk-KHRLI7AH.js";import{$ as c,B as s,Mc as d,Wf as u,Y as n,j as h}from"./chunk-X3RCWQ3R.js";import{i as o}from"./chunk-SR6RTMQI.js";var v=(()=>{let r=class r{constructor(e,t){o(this,"authHttp");o(this,"restExtractor");this.authHttp=e,this.restExtractor=t}getChapters(e){let t=m.buildVideoPasswordHeader(e.videoPassword);return this.authHttp.get(`${p.BASE_VIDEO_URL}/${e.videoId}/chapters`,{headers:t}).pipe(s(i=>this.restExtractor.handleError(i)))}updateChapters(e,t){if(t.shouldUpdateAPI()!==!0)return h(!0);let i={chapters:t.getChaptersForUpdate()};return this.authHttp.put(`${p.BASE_VIDEO_URL}/${e}/chapters`,i).pipe(s(f=>this.restExtractor.handleError(f)))}};o(r,"\u0275fac",function(t){return new(t||r)(c(d),c(u))}),o(r,"\u0275prov",n({token:r,factory:r.\u0275fac}));let a=r;return a})();export{v as a};
/**i18n:3d16453f213eb5db982e7e7dd90631843ac5d3f860726a614777c3e9e3f9b57e*/
//# sourceMappingURL=chunk-4JJYCM2Y.js.map
