import{a as P,b as w,c as M}from"./chunk-PEA4JOWD.js";import{a as E}from"./chunk-DBYZ6UVQ.js";import{a as n}from"./chunk-ITVQPMQ3.js";import"./chunk-ZIFVZYUP.js";import"./chunk-XYEO36EG.js";import"./chunk-NIOOPBJI.js";import"./chunk-N2SPVEKZ.js";import"./chunk-H3MSDHRM.js";import{c as F,g as C,h as A}from"./chunk-BHWIBFBN.js";import"./chunk-2FQYLVJI.js";import"./chunk-X4RZ7HTV.js";import"./chunk-6Q4FAQ3F.js";import"./chunk-VTII3YKG.js";import"./chunk-HVGMIQOP.js";import"./chunk-KZPA6MNJ.js";import"./chunk-SUEQIO6S.js";import"./chunk-GLBFTA5F.js";import"./chunk-XHH6GNS3.js";import"./chunk-TEUWQ6HY.js";import"./chunk-VIMY7YSQ.js";import"./chunk-X4FM4H2E.js";import"./chunk-OQPRJXIG.js";import"./chunk-LZB4RNES.js";import"./chunk-KGNE4JKH.js";import{c as O}from"./chunk-X7CHLTWB.js";import"./chunk-EFDZYPES.js";import"./chunk-VF2A3OT4.js";import"./chunk-NEDP4JVC.js";import"./chunk-HVLAJT7O.js";import"./chunk-YCVIXSU2.js";import"./chunk-HYSY7NOJ.js";import"./chunk-VG7JIT57.js";import"./chunk-V5DV6KGK.js";import"./chunk-V26PQWAW.js";import"./chunk-KZ2ERJXC.js";import"./chunk-WLGCFIUG.js";import"./chunk-4EJIV37M.js";import"./chunk-OAV2CNYM.js";import"./chunk-EK2OSF5G.js";import"./chunk-KATZWC56.js";import"./chunk-XQH6HV66.js";import"./chunk-RIQXTFFV.js";import"./chunk-BO66CCIZ.js";import{Da as S,Db as T,L as p,Na as f,Oh as I,R as u,T as m,ba as o,jh as k,mb as b,n as l,nb as v,ob as h,oh as y,pb as g,yh as _,zh as V}from"./chunk-EKZJWO2J.js";import{a as c,b as a,i as d}from"./chunk-BODC7FZN.js";var R=(()=>{let r=class r{authService=o(k);userSubscription=o(n);hooks=o(I);videoService=o(O);scopedTokensService=o(y);getVideosObservableFunction=this.getVideosObservable.bind(this);getSyndicationItemsFunction=this.getSyndicationItems.bind(this);defaultSort="-publishedAt";actions=[{routerLink:"/my-library/subscriptions",label:"Manage",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(),u(()=>this.scopedTokensService.getScopedTokens()),m(i=>this.feedToken=i.feedToken));return l(e);}};d(r,"\u0275fac",function(i){return new(i||r)();}),d(r,"\u0275cmp",f({type:r,selectors:[["my-videos-user-subscriptions"]],decls:3,vars:5,consts:()=>{let e;return e="Vid\xE8os de v\xF2stres abonaments",[e,[1,"visually-hidden"],["displayFilters","false","loadUserVideoPreferences","false","groupByDate","true","highlightLives","false",3,"getVideosObservableFunction","getSyndicationItemsFunction","defaultSort","disabled","headerActions"]];},template:function(i,t){i&1&&(v(0,"h1",1),T(1,0),h(),g(2,"my-videos-list",2)),i&2&&(S(2),b("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,F,A,C],children:[{path:"overview",component:w,data:{meta:{title:"Discover videos"},reuse:{enabled:!0,key:"videos-discover"}}},{path:"most-liked",redirectTo:"browse?scope=federated&sort=-likes"},{path:"trending",redirectTo:()=>"browse?scope=federated&sort=-"+o(_).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:"Subscriptions"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:e079feaac094a2c754af8c2d9f82a9400e546e6b8cdd8ff7d538e47a33fc4649*///# sourceMappingURL=chunk-QEV265N5.js.map