import{a as M,b as w,c as D}from"./chunk-LVSSNKXJ.js";import{a as P}from"./chunk-676FFAI6.js";import{a as n}from"./chunk-ZXCBEUCX.js";import"./chunk-6V2GUMYE.js";import"./chunk-4JV6YU23.js";import"./chunk-7DKFCCY3.js";import"./chunk-4BLMQI55.js";import{b as A}from"./chunk-FEWUV3UJ.js";import"./chunk-KUPWNYK6.js";import{e as O,f as F,h as E}from"./chunk-744MJ7K4.js";import"./chunk-57S2OCZO.js";import"./chunk-DA5QW2FW.js";import"./chunk-ZTACZQT5.js";import"./chunk-VUTPVHTM.js";import"./chunk-J5WP7S7I.js";import"./chunk-FWTOMGWS.js";import"./chunk-V5M4OE3J.js";import"./chunk-CE2LQAHG.js";import"./chunk-WLA3SNC6.js";import"./chunk-YULFPS54.js";import"./chunk-X4BLRUCF.js";import"./chunk-VKQCXZ43.js";import"./chunk-5246EKZF.js";import"./chunk-NGWG2PKU.js";import{c as C}from"./chunk-NJ5QGAXC.js";import"./chunk-UVCMNOGP.js";import"./chunk-BSJJN5YG.js";import"./chunk-YXMZ6Y2Z.js";import"./chunk-YXDC36MS.js";import"./chunk-DRC3434R.js";import"./chunk-2P2POCS2.js";import"./chunk-TTBPS4VU.js";import"./chunk-MVAKIJR4.js";import"./chunk-TP3WH7UR.js";import"./chunk-CZGYAYNI.js";import"./chunk-V2URXGKR.js";import"./chunk-HQ2QSLRU.js";import"./chunk-R3OBDIDF.js";import"./chunk-MOA5OONJ.js";import"./chunk-BXPOMRLN.js";import"./chunk-5DDHXOCF.js";import"./chunk-YLQIMX27.js";import"./chunk-I267ADJP.js";import"./chunk-NIY7P74G.js";import{$a as b,Fa as v,Ga as s,La as S,S as p,Sf as k,U as u,Yf as I,ba as m,ib as f,jb as h,jg as y,kb as g,m as l,og as V,pg as _,sb as T}from"./chunk-4JM6MIZ5.js";import{a as c,b as a,i as d}from"./chunk-QJQRWPYR.js";var R=(()=>{let o=class o{authService;userSubscription;hooks;videoService;scopedTokensService;getVideosObservableFunction=this.getVideosObservable.bind(this);getSyndicationItemsFunction=this.getSyndicationItems.bind(this);defaultSort="-publishedAt";actions=[{routerLink:"/my-library/subscriptions",label:"Manage",iconName:"cog"}];disabled=!1;feedToken;constructor(e,i,t,U,L){this.authService=e,this.userSubscription=i,this.hooks=t,this.videoService=U,this.scopedTokensService=L;}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(o,"\u0275fac",function(i){return new(i||o)(s(k),s(n),s(y),s(C),s(I));}),d(o,"\u0275cmp",S({type:o,selectors:[["my-videos-user-subscriptions"]],decls:3,vars:5,consts:()=>{let e;return e="Videoer fra dine abonnementer",[e,[1,"visually-hidden"],["displayFilters","false","displayModerationBlock","false","loadUserVideoPreferences","false","groupByDate","true","highlightLives","false",3,"getVideosObservableFunction","getSyndicationItemsFunction","defaultSort","disabled","headerActions"]];},template:function(i,t){i&1&&(f(0,"h1",1),T(1,0),h(),g(2,"my-videos-list",2)),i&2&&(v(2),b("getVideosObservableFunction",t.getVideosObservableFunction)("getSyndicationItemsFunction",t.getSyndicationItemsFunction)("defaultSort",t.defaultSort)("disabled",t.disabled)("headerActions",t.actions));},dependencies:[P],encapsulation:2}));let r=o;return r;})();var se=[{path:"",providers:[M,n,A,E,F,O],children:[{path:"overview",component:w,data:{meta:{title:"Oppdag videoer"},reuse:{enabled:!0,key:"videos-discover"}}},{path:"most-liked",redirectTo:"browse?scope=federated&sort=-likes"},{path:"trending",redirectTo:()=>"browse?scope=federated&sort=-"+m(V).getDefaultTrendingSort()},{path:"recently-added",redirectTo:"browse?scope=federated&sort=-publishedAt"},{path:"local",redirectTo:"browse?scope=local&sort=-publishedAt"},{path:"browse",component:D,data:{reuse:{enabled:!0,key:"videos-list"}}},{path:"subscriptions",canActivate:[_],component:R,data:{meta:{title:"Abonnenter"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{se as default};/**i18n:68865f44f2a527c44cf5136a17c76a0ff8308c2bae5c7c8d50070a5fb9847c44*///# sourceMappingURL=chunk-SDXWW3K7.js.map