import{a as P,b as w,c as M}from"./chunk-4U7CRTAU.js";import{a as E}from"./chunk-RVSI67EE.js";import{a as n}from"./chunk-PR4TKOJP.js";import"./chunk-H4OAJCRB.js";import"./chunk-UIXDO76R.js";import{b as O}from"./chunk-BCITBHCT.js";import"./chunk-AMKDBJ6F.js";import{d as F,h as C,i as A}from"./chunk-PBYH7RMY.js";import"./chunk-MSNAVIOI.js";import"./chunk-BKOY3MDH.js";import"./chunk-6SIZ7WEI.js";import"./chunk-XQ5IN4ZO.js";import"./chunk-7FFAGNUZ.js";import"./chunk-6WWBELYB.js";import"./chunk-KYLIZMDU.js";import"./chunk-A6J6W6PT.js";import"./chunk-3JEQK4X4.js";import"./chunk-FTJ4EUOY.js";import"./chunk-XVUFDEMS.js";import"./chunk-5VE2IDUJ.js";import{c as I}from"./chunk-TEWEKZE4.js";import"./chunk-GYUUHJHO.js";import"./chunk-56EHH477.js";import"./chunk-DKG2KIA4.js";import"./chunk-UHBBURJJ.js";import"./chunk-DLN4X5UL.js";import"./chunk-5RZNWWZS.js";import"./chunk-ZS7KQDH6.js";import"./chunk-RYQTF4WW.js";import"./chunk-5DWJQNW5.js";import"./chunk-YAXIPU7Q.js";import"./chunk-3Q7EKQKX.js";import"./chunk-6VQ6ANCO.js";import"./chunk-PFFW6WF3.js";import"./chunk-5JFAGJ5Y.js";import"./chunk-AQDUOXUN.js";import"./chunk-LHJFDW2A.js";import"./chunk-J3Q5GF64.js";import"./chunk-FE65AIAB.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-WOSO3QBJ.js";import{a as c,b as a,i as d}from"./chunk-C2HMJUB7.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:"Hantera",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="Videor fr\xE5n dina prenumerationer",[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:"Uppt\xE4ck videor"},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:"Prenumerationer"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:b44b17e72e4b9ae03afb92709eafda64a985c0c8f0453c865708cceafe42f927*///# sourceMappingURL=chunk-RZD2VKMT.js.map