import{a as P,b as w,c as M}from"./chunk-SCDGWKZ7.js";import{a as E}from"./chunk-7HE4BNZ2.js";import{a as n}from"./chunk-MEN2JJFW.js";import"./chunk-DLBNKOHU.js";import"./chunk-FXBPWJJX.js";import{b as O}from"./chunk-ZHNYUIQP.js";import"./chunk-2QU4OYAF.js";import{d as F,h as C,i as A}from"./chunk-OTW6IYU4.js";import"./chunk-BBDMFOE7.js";import"./chunk-CAVWLTK5.js";import"./chunk-XDD4WM6C.js";import"./chunk-DBZ6MH2C.js";import"./chunk-OCQ7CZNJ.js";import"./chunk-MSF7AKFB.js";import"./chunk-FATYHPJB.js";import"./chunk-K3GK77SH.js";import"./chunk-Z564L7ME.js";import"./chunk-VAR5DVCC.js";import"./chunk-XXKKXH3F.js";import"./chunk-EODECNYO.js";import{c as I}from"./chunk-D7MA7JVY.js";import"./chunk-DVJO3NDK.js";import"./chunk-UREP5EKW.js";import"./chunk-SH7EGYTS.js";import"./chunk-NGDAMIO5.js";import"./chunk-SY6I63OV.js";import"./chunk-JTC564BU.js";import"./chunk-LPBFFGQZ.js";import"./chunk-K7ED5NZ5.js";import"./chunk-K57X56UD.js";import"./chunk-BM2GYVJJ.js";import"./chunk-KG6MKXQY.js";import"./chunk-CQZTW4G6.js";import"./chunk-MQ2SXMN4.js";import"./chunk-WM72G2MQ.js";import"./chunk-M2FB7JRB.js";import"./chunk-T6AIIPLN.js";import"./chunk-5V4OEYNC.js";import"./chunk-QPR7P2GZ.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-7XZKA4JV.js";import{a as c,b as a,i as d}from"./chunk-ROL33JP2.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:"Hallinnoi",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="Videoita tilauksistasi",[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:"L\xF6yd\xE4 videoita"},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:"Tilaukset"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:37786acc6a78281d9fbe29f0e76f79a0df01fc58cd74a91d2d29106b1f1580b1*///# sourceMappingURL=chunk-F55IFYRW.js.map