import{a as P,b as w,c as M}from"./chunk-3UXPV2W7.js";import{a as E}from"./chunk-AMC4T4QP.js";import{a as n}from"./chunk-MJ42ODAB.js";import"./chunk-CPBBYFI4.js";import"./chunk-BAKS4LZM.js";import{b as O}from"./chunk-3MWS7X2H.js";import"./chunk-W6IP73OX.js";import{d as F,h as C,i as A}from"./chunk-JTWQMCTH.js";import"./chunk-RN3LTKP7.js";import"./chunk-4TY5PCIF.js";import"./chunk-6UGSR2QS.js";import"./chunk-XWQUN3FC.js";import"./chunk-WACJCSRS.js";import"./chunk-MHEAHTNI.js";import"./chunk-YRUU56H3.js";import"./chunk-MZPTWN6L.js";import"./chunk-YWPWXCFC.js";import"./chunk-ZI33XDIM.js";import"./chunk-S4EXAOYK.js";import"./chunk-THDNCPPH.js";import{c as I}from"./chunk-OPDMV554.js";import"./chunk-O5UEGU4Z.js";import"./chunk-2BMYENTD.js";import"./chunk-XIQFOTS2.js";import"./chunk-24YSJFPE.js";import"./chunk-CU5CFJU7.js";import"./chunk-IFVT3AN2.js";import"./chunk-AC7EAXHT.js";import"./chunk-WND2D7IY.js";import"./chunk-6PT75CZB.js";import"./chunk-YICAJCBU.js";import"./chunk-TAQK5S2I.js";import"./chunk-EBYJH3HW.js";import"./chunk-BFIHPBHB.js";import"./chunk-HZDVLO62.js";import"./chunk-PA2YIUJZ.js";import"./chunk-YGZDCBSD.js";import"./chunk-EKD65OAZ.js";import"./chunk-NVRIF56Y.js";import{Ag as V,Ga as m,Pg as _,Q as p,Ra as S,S as u,aa as o,db as v,kg as T,m as l,mb as b,nb as f,ob as h,qg as y,wb as g,zg as k}from"./chunk-XBTZE2EC.js";import{a as c,b as a,i as d}from"./chunk-WHYNGVB3.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:"Gestionar",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="V\xEDdeos des de les vostres subscripcions",[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:"Descobrir v\xEDdeos"},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:"Subscripcions"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:56bde403ffba090cdb11aaac0f86ffb9ae7c2bab95df4b44d5dba510264fcf4f*///# sourceMappingURL=chunk-ENQZMEC3.js.map