import{a as P,b as w,c as M}from"./chunk-5ZQ6K6AE.js";import{a as E}from"./chunk-DQFES35I.js";import{a as n}from"./chunk-3U4YOIHG.js";import"./chunk-D6AVXVR5.js";import"./chunk-EEO2Q343.js";import{b as O}from"./chunk-JCQMEXJ4.js";import"./chunk-3S4WEKEQ.js";import{d as F,h as C,i as A}from"./chunk-6U7SKLV2.js";import"./chunk-45RJVCVL.js";import"./chunk-EJMHK3TB.js";import"./chunk-TER4AORI.js";import"./chunk-GWM7FJNU.js";import"./chunk-XSJA4NKN.js";import"./chunk-PXNYFE55.js";import"./chunk-GG44KDTN.js";import"./chunk-SNP2DF75.js";import"./chunk-ASMXK3KC.js";import"./chunk-2JXASSXY.js";import"./chunk-GJACQSRQ.js";import"./chunk-YQX5BBJC.js";import{c as I}from"./chunk-3TQDK2YO.js";import"./chunk-R5MYK4IG.js";import"./chunk-MLCCX6HI.js";import"./chunk-S7IGR6K2.js";import"./chunk-L6E3ZWM6.js";import"./chunk-OFEA32XY.js";import"./chunk-E43AMUC2.js";import"./chunk-A2YAEFFT.js";import"./chunk-ICCCQM5N.js";import"./chunk-S6J5WRVL.js";import"./chunk-LBO7MFW4.js";import"./chunk-K7NHRQFT.js";import"./chunk-R5ZMJY6Q.js";import"./chunk-V2BGFVNL.js";import"./chunk-ERZ6BKXD.js";import"./chunk-4QJHS7MU.js";import"./chunk-PMIZVEYT.js";import"./chunk-4CAF5TCV.js";import"./chunk-MJV6N5M3.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-WVVK4EBY.js";import{a as c,b as a,i as d}from"./chunk-LV2JZWXA.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:"Spravovat",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="Videa od va\u0161ich odb\u011Br\u016F",[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:"Objevujte videa"},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:"Odb\u011Bry"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:b046b42d3b2db5c4a6153f28081b96130c38e9218feb7118271ff63b274934c4*///# sourceMappingURL=chunk-J22Z7ZSY.js.map