import{a as E,b as P,c as w}from"./chunk-5ZMDCLKA.js";import{a as A}from"./chunk-3FY3DFDK.js";import{a as n}from"./chunk-JYLKQAU3.js";import"./chunk-SBJ7PIFO.js";import"./chunk-NWT2XP3V.js";import"./chunk-RGLK5IEE.js";import"./chunk-7PGW2JNG.js";import"./chunk-WQWKKHX2.js";import{c as O,g as F,h as C}from"./chunk-H7G576MG.js";import"./chunk-GZFOY262.js";import"./chunk-VJ5OMPQD.js";import"./chunk-DN5K4BTU.js";import"./chunk-ZSCT5MPK.js";import"./chunk-R3RCTP7Y.js";import"./chunk-7LBYGUEC.js";import"./chunk-QE43GCDT.js";import"./chunk-CPFYZTBP.js";import"./chunk-SB6JKN5N.js";import"./chunk-QKS32OUP.js";import"./chunk-E4VNMGFY.js";import"./chunk-J5Y7EBAT.js";import"./chunk-TYOZ7LJW.js";import"./chunk-SMPG6HOB.js";import"./chunk-2GL4IZBA.js";import{c as I}from"./chunk-TQUYGBVG.js";import"./chunk-HLOOXAIQ.js";import"./chunk-K7HENY5F.js";import"./chunk-QYGUMUGN.js";import"./chunk-VUTL6VWZ.js";import"./chunk-ZGZL4C6F.js";import"./chunk-UJVEJYDL.js";import"./chunk-U4UBJDXL.js";import"./chunk-KUFH5V3T.js";import"./chunk-V7D5UQ6P.js";import"./chunk-ICRG7CY6.js";import"./chunk-VFZ3Y5O2.js";import"./chunk-LOOUJWFZ.js";import"./chunk-WCHENBV3.js";import"./chunk-2XR2VGOA.js";import"./chunk-XZLMPP4F.js";import"./chunk-VJOXMIQY.js";import"./chunk-UR42IA56.js";import{Aa as m,Eh as T,Jh as k,Ka as S,Q as p,S as u,Sh as y,Th as _,aa as o,eb as b,fb as f,gb as v,gi as V,hb as h,m as l,vb as g}from"./chunk-CUA2BO3S.js";import{a as c,b as a,i as d}from"./chunk-75J4RO44.js";var M=(()=>{let r=class r{authService=o(T);userSubscription=o(n);hooks=o(V);videoService=o(I);scopedTokensService=o(k);getVideosObservableFunction=this.getVideosObservable.bind(this);getSyndicationItemsFunction=this.getSyndicationItems.bind(this);defaultSort="-publishedAt";actions=[{routerLink:"/my-library/subscriptions",label:"Zarz\u0105dzaj",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&&(f(0,"h1",1),g(1,0),v(),h(2,"my-videos-list",2)),i&2&&(m(2),b("getVideosObservableFunction",t.getVideosObservableFunction)("getSyndicationItemsFunction",t.getSyndicationItemsFunction)("defaultSort",t.defaultSort)("disabled",t.disabled)("headerActions",t.actions));},dependencies:[A],encapsulation:2}));let s=r;return s;})();var oe=[{path:"",providers:[E,n,O,C,F],children:[{path:"overview",component:P,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(y).getDefaultTrendingSort()},{path:"recently-added",redirectTo:"browse?scope=federated&sort=-publishedAt"},{path:"local",redirectTo:"browse?scope=local&sort=-publishedAt"},{path:"browse",component:w,data:{reuse:{enabled:!0,key:"videos-list"}}},{path:"subscriptions",canActivate:[_],component:M,data:{meta:{title:"Subskrypcje"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{oe as default};/**i18n:42440f0a8726af1836b15b193adfd3f46a3ecd983a1ed2a1e05982c4f600c8a1*///# sourceMappingURL=chunk-E2GQLIQ3.js.map