import{a as E,b as P,c as w}from"./chunk-UQPXH2OD.js";import{a as A}from"./chunk-M3LZBDDR.js";import{a as n}from"./chunk-42J7MELV.js";import"./chunk-BQVRHZWR.js";import"./chunk-GWDJYVIL.js";import"./chunk-KG6KCEF6.js";import"./chunk-X56LARPA.js";import"./chunk-H57GK6SM.js";import{c as O,g as F,h as C}from"./chunk-OKCQOETP.js";import"./chunk-OIYWA2HS.js";import"./chunk-FE553XN2.js";import"./chunk-GAFOTJIM.js";import"./chunk-GEZBLZ5C.js";import"./chunk-MC2ISO42.js";import"./chunk-KRJDYYLG.js";import"./chunk-DQ7X5ENA.js";import"./chunk-6KQT4JX6.js";import"./chunk-UU6OPGXG.js";import"./chunk-GCHKGY6V.js";import"./chunk-VN5RUFMQ.js";import"./chunk-X2ED62BI.js";import"./chunk-FCLJQZXD.js";import"./chunk-XMYCMRMC.js";import"./chunk-66LMAQUK.js";import{c as I}from"./chunk-V4YGGZ4W.js";import"./chunk-PBWCQDPD.js";import"./chunk-ESBU7OHQ.js";import"./chunk-NRDFEUGY.js";import"./chunk-T5RBWDW4.js";import"./chunk-JRPZV2OL.js";import"./chunk-JTA5GQKU.js";import"./chunk-DGPQDLRR.js";import"./chunk-X3SPFC3P.js";import"./chunk-FV3DX7LT.js";import"./chunk-ITB6MN7G.js";import"./chunk-EATDPRVO.js";import"./chunk-VPWIEXHH.js";import"./chunk-TTVU4ATD.js";import"./chunk-2AOWEEBV.js";import"./chunk-V6J7QVDD.js";import"./chunk-QYZO4RSP.js";import"./chunk-AWFGIQSJ.js";import{Ah as k,Ha as m,Jh as y,Kh as _,Q as p,S as u,Sa as S,Zh as V,aa as o,eb as b,m as l,ob as f,pb as v,qb as h,vh as T,yb as g}from"./chunk-GKQGDBUU.js";import{a as c,b as a,i as d}from"./chunk-QVFSZZWQ.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:"Upravljaj",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="Videa tvojih pretplata",[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:"Otkrij videa"},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:"Pretplate"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{oe as default};/**i18n:42345378061bf3c93df67acfa161b751a7b03cc91f3ede7c1f1cdf2bba62fe26*///# sourceMappingURL=chunk-R67CYHY2.js.map