import{a as P,b as w,c as M}from"./chunk-R4XPNEZT.js";import{a as E}from"./chunk-QIWAFFTT.js";import{a as n}from"./chunk-SSCC7MGZ.js";import"./chunk-H7UT74C3.js";import"./chunk-TDQ6F4XT.js";import{b as O}from"./chunk-IESWLWCM.js";import"./chunk-S7WOCUQ2.js";import{d as F,h as C,i as A}from"./chunk-JFGT67YX.js";import"./chunk-WQWXVURB.js";import"./chunk-XN5VGOY3.js";import"./chunk-7344G3YP.js";import"./chunk-BKU2DSDZ.js";import"./chunk-RK5FDUTK.js";import"./chunk-O4MCDG4N.js";import"./chunk-X3SK3MEW.js";import"./chunk-EP2HGG7C.js";import"./chunk-G5T6ORUC.js";import"./chunk-EVRWRCHV.js";import"./chunk-SRBO53F2.js";import"./chunk-YDBUF43R.js";import{c as I}from"./chunk-25WZCO2A.js";import"./chunk-5SLIQZK7.js";import"./chunk-5JAK2NA2.js";import"./chunk-O55TOQ2N.js";import"./chunk-YVLRBJW2.js";import"./chunk-B72BY6K4.js";import"./chunk-4ZCAGUOZ.js";import"./chunk-FBJ7B5CZ.js";import"./chunk-XOYRFZBX.js";import"./chunk-3ZQQIG2S.js";import"./chunk-BBWICLSL.js";import"./chunk-GMJHSSIR.js";import"./chunk-LG5EDBPS.js";import"./chunk-4QFOTEEV.js";import"./chunk-7TB6DVNP.js";import"./chunk-3SU6BOTP.js";import"./chunk-H56GXXGB.js";import"./chunk-HFUYX2U4.js";import"./chunk-HWX42522.js";import{Bg as k,Cg as V,Ha as m,Rg as _,S as p,Sa as S,U as u,ba as o,gb as v,m as l,mg as T,pb as b,qb as f,rb as h,sg as y,zb as g}from"./chunk-YAKH5Q6V.js";import{a as c,b as a,i as d}from"./chunk-DM5LJ7VI.js";var R=(()=>{let r=class r{authService=o(T);userSubscription=o(n);hooks=o(_);videoService=o(I);scopedTokensService=o(y);getVideosObservableFunction=this.getVideosObservable.bind(this);getSyndicationItemsFunction=this.getSyndicationItems.bind(this);defaultSort="-publishedAt";actions=[{routerLink:"/my-library/subscriptions",label:"Verwalten",iconName:"cog"}];disabled=!1;feedToken;getVideosObservable(e,i){let t=a(c({},i.toVideosAPIObject()),{videoPagination:e,skipCount:!0});return this.hooks.wrapObsFun(this.userSubscription.getUserSubscriptionVideos.bind(this.userSubscription),t,"common","filter:api.user-subscriptions-videos.videos.list.params","filter:api.user-subscriptions-videos.videos.list.result");}getSyndicationItems(){return this.loadFeedToken().then(()=>{let e=this.authService.getUser();return this.videoService.getVideoSubscriptionFeedUrls(e.account.id,this.feedToken);});}disableForReuse(){this.disabled=!0;}enabledForReuse(){this.disabled=!1;}loadFeedToken(){if(this.feedToken)return Promise.resolve(this.feedToken);let e=this.authService.userInformationLoaded.pipe(p(()=>this.scopedTokensService.getScopedTokens()),u(i=>this.feedToken=i.feedToken));return l(e);}};d(r,"\u0275fac",function(i){return new(i||r)();}),d(r,"\u0275cmp",S({type:r,selectors:[["my-videos-user-subscriptions"]],decls:3,vars:5,consts:()=>{let e;return e="Videos aus deinen Abos",[e,[1,"visually-hidden"],["displayFilters","false","loadUserVideoPreferences","false","groupByDate","true","highlightLives","false",3,"getVideosObservableFunction","getSyndicationItemsFunction","defaultSort","disabled","headerActions"]];},template:function(i,t){i&1&&(b(0,"h1",1),g(1,0),f(),h(2,"my-videos-list",2)),i&2&&(m(2),v("getVideosObservableFunction",t.getVideosObservableFunction)("getSyndicationItemsFunction",t.getSyndicationItemsFunction)("defaultSort",t.defaultSort)("disabled",t.disabled)("headerActions",t.actions));},dependencies:[E],encapsulation:2}));let s=r;return s;})();var te=[{path:"",providers:[P,n,O,F,A,C],children:[{path:"overview",component:w,data:{meta:{title:"Videos entdecken"},reuse:{enabled:!0,key:"videos-discover"}}},{path:"most-liked",redirectTo:"browse?scope=federated&sort=-likes"},{path:"trending",redirectTo:()=>"browse?scope=federated&sort=-"+o(k).getDefaultTrendingSort()},{path:"recently-added",redirectTo:"browse?scope=federated&sort=-publishedAt"},{path:"local",redirectTo:"browse?scope=local&sort=-publishedAt"},{path:"browse",component:M,data:{reuse:{enabled:!0,key:"videos-list"}}},{path:"subscriptions",canActivate:[V],component:R,data:{meta:{title:"Abos"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:197837fef124041a3f31333a5ea4afa44db030645e23ee7031f32704e8696a1d*///# sourceMappingURL=chunk-46ZB35LJ.js.map