import{a as P,b as w,c as M}from"./chunk-DYDQ6JLL.js";import{a as E}from"./chunk-5POIVNY5.js";import{a as n}from"./chunk-7ZLMIGCI.js";import"./chunk-NS5YGPZ6.js";import"./chunk-IMLRHIEX.js";import{b as O}from"./chunk-L5OTRZ7C.js";import"./chunk-O6JXR2OW.js";import{d as F,h as C,i as A}from"./chunk-LBZ4WOSX.js";import"./chunk-SY4AOJQ7.js";import"./chunk-EIHKEQI5.js";import"./chunk-VFBRWSLH.js";import"./chunk-RKTIEY3M.js";import"./chunk-UW23W2GE.js";import"./chunk-GB32VWGA.js";import"./chunk-XUBWN4QQ.js";import"./chunk-GSBGV76F.js";import"./chunk-N3A4CCRB.js";import"./chunk-3UUFR5X3.js";import"./chunk-73Z5KCOV.js";import{c as I}from"./chunk-D7H42SK4.js";import"./chunk-2EJJTPWC.js";import"./chunk-DSBAZZXJ.js";import"./chunk-TSBSUMF7.js";import"./chunk-W745FSLQ.js";import"./chunk-IRNN3GVG.js";import"./chunk-2TVFIIIH.js";import"./chunk-LN6GZSCF.js";import"./chunk-VGCPEGLQ.js";import"./chunk-QAPESTOS.js";import"./chunk-I7RAUMQD.js";import"./chunk-EFFM3OQ7.js";import"./chunk-GMQ6H2MB.js";import"./chunk-O4FGKTD6.js";import"./chunk-TC3TWP3Y.js";import"./chunk-6CO3TQ23.js";import"./chunk-WBNZT2UZ.js";import"./chunk-RTQ2EPMM.js";import"./chunk-4GTILEN6.js";import"./chunk-WTQ3NEC7.js";import"./chunk-JWTR3OKP.js";import"./chunk-A6GAOBDS.js";import"./chunk-TC6VXY6B.js";import{Ah as y,Ha as m,Jh as k,Kh as V,Q as p,S as u,Sa as S,Zh as _,aa as o,eb as v,m as l,nb as b,ob as f,pb as h,vh as T,xb as g}from"./chunk-K5TQVRW4.js";import{a as c,b as a,i as d}from"./chunk-RYEVWIKN.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:"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(()=>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="Filmy z twoich subskrypcji",[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:"Odkrywaj filmy"},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:"Subskrypcje"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:3ab8a6a12ff574644ebf46057f36e5643b4288edb94e57af377eaee98d8b77d4*///# sourceMappingURL=chunk-7I6VWUIK.js.map