import{a as P,b as w,c as M}from"./chunk-KY4L6JOV.js";import{a as E}from"./chunk-UVWEWITA.js";import{a as n}from"./chunk-YP2ZZYVY.js";import"./chunk-O2KH3MKW.js";import"./chunk-5GEU3TFS.js";import"./chunk-WNO6N5HY.js";import"./chunk-UBU2CFVX.js";import"./chunk-WQSXUN2B.js";import{c as F,g as C,h as A}from"./chunk-E4XRA4V2.js";import"./chunk-3UY4NPZA.js";import"./chunk-QW6WJWKH.js";import"./chunk-KUVCZRLX.js";import"./chunk-EN2OO25U.js";import"./chunk-RTSWJO5X.js";import"./chunk-7WRF56BE.js";import"./chunk-ZR7E4GBB.js";import"./chunk-R6UFR6OP.js";import"./chunk-TAAPE2KQ.js";import"./chunk-Y2WEUXNI.js";import"./chunk-G756IDGK.js";import"./chunk-5RDK7NWN.js";import"./chunk-KFVLXK7J.js";import"./chunk-J6ED7RJB.js";import"./chunk-EB5QHVRE.js";import{c as O}from"./chunk-QSSD454H.js";import"./chunk-4AW7XUEV.js";import"./chunk-6B7LVSD5.js";import"./chunk-TMELUQIT.js";import"./chunk-4KR5QHBK.js";import"./chunk-ADNRDCXI.js";import"./chunk-BRGZHMSB.js";import"./chunk-UDJAXJ5I.js";import"./chunk-OW5DLQI4.js";import"./chunk-NT6MJVBJ.js";import"./chunk-PH6OCYZ4.js";import"./chunk-5FHECZHZ.js";import"./chunk-LQJE4VHL.js";import"./chunk-BYP5TNEI.js";import"./chunk-53J3B7V7.js";import"./chunk-ZRPU55OY.js";import"./chunk-U7YDHGE3.js";import"./chunk-TNCGHY53.js";import"./chunk-MUVDKD7T.js";import{Ah as V,Da as S,Db as T,L as p,Na as f,Ph as I,R as u,T as m,ba as o,kh as k,mb as b,n as l,nb as v,ob as h,pb as g,ph as y,zh as _}from"./chunk-DZBHF6HI.js";import{a as c,b as a,i as d}from"./chunk-IQVXR75E.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:"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(),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="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&&(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:"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(_).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:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*///# sourceMappingURL=chunk-OPVDRHG5.js.map