import{a as P,b as w,c as M}from"./chunk-Q3UIMWVF.js";import{a as E}from"./chunk-KJQLHVJF.js";import{a as n}from"./chunk-FMLZJNT5.js";import"./chunk-FXAONC2T.js";import"./chunk-LZBLA6BT.js";import{b as O}from"./chunk-3X5P6HQO.js";import"./chunk-KRC34ETQ.js";import{d as F,h as C,i as A}from"./chunk-DJYD3TTK.js";import"./chunk-CRTMPH35.js";import"./chunk-T3QPQ646.js";import"./chunk-V4KZUAN3.js";import"./chunk-Y2KRUVPV.js";import"./chunk-NLL2DMED.js";import"./chunk-ZH7K5BUD.js";import"./chunk-H2OYJXAX.js";import"./chunk-5Z2TQY6V.js";import"./chunk-UJO73PMR.js";import"./chunk-CXMFPCKK.js";import{c as I}from"./chunk-7ROHYKX4.js";import"./chunk-VTVCZMX2.js";import"./chunk-SINZMQDH.js";import"./chunk-RKCRS6MC.js";import"./chunk-UKMNTWVD.js";import"./chunk-7VZ4GMDK.js";import"./chunk-P62PHQFC.js";import"./chunk-XV6N7FCN.js";import"./chunk-AUMGG4VE.js";import"./chunk-NDRCFTX6.js";import"./chunk-IUO6RIHU.js";import"./chunk-6CREIU7B.js";import"./chunk-UQZGWEA7.js";import"./chunk-KSLOMNLK.js";import"./chunk-Z7Y7DW4A.js";import"./chunk-TH2IQMBR.js";import"./chunk-CK7X27BO.js";import"./chunk-NY4ZALB6.js";import"./chunk-HY3WB3GH.js";import"./chunk-QBF47466.js";import"./chunk-GHE5JSEY.js";import"./chunk-6B2INHH4.js";import"./chunk-77K4SKWD.js";import"./chunk-JRT5Q4WM.js";import{Bh as k,Ch as V,Ga as m,Q as p,Ra as S,Rh as _,S as u,aa as o,db as v,m as l,mb as b,nb as f,nh as T,ob as h,sh as y,wb as g}from"./chunk-IDYB4NXF.js";import{a as c,b as a,i as d}from"./chunk-AI7IVZV2.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:"Administrer",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="Videoer fra dine abonnementer",[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:"Oppdag videoer"},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:"Abonnenter"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:1cf7c077143c4c267fdafbe5508f191afcef21bad6aba22a3a8dc180e1003753*///# sourceMappingURL=chunk-LCPGPKPL.js.map