import{a as P,b as w,c as M}from"./chunk-NAQQ66MG.js";import{a as E}from"./chunk-MWHCOBFS.js";import{a as n}from"./chunk-64SX7QEH.js";import"./chunk-GF7EFYWW.js";import"./chunk-RCMVAG7F.js";import"./chunk-WT3GM3LI.js";import"./chunk-HFLMNLM5.js";import"./chunk-O4DTQ4SJ.js";import{c as F,g as C,h as A}from"./chunk-MGDE33BA.js";import"./chunk-GJO35GUD.js";import"./chunk-4FDYCPKM.js";import"./chunk-6P2PS6DB.js";import"./chunk-QLGMD6HE.js";import"./chunk-WO3JYBTA.js";import"./chunk-564SGFOD.js";import"./chunk-U4QRWBDV.js";import"./chunk-AGSAR3UO.js";import"./chunk-EV5P7DNW.js";import"./chunk-DQ3WDHAC.js";import"./chunk-SHK6FCIM.js";import"./chunk-HIRFM4BN.js";import"./chunk-WOXMQOJM.js";import"./chunk-ONEK2N3O.js";import"./chunk-ZDPQHKE2.js";import{c as O}from"./chunk-7OSLZK4S.js";import"./chunk-V7MLKNFX.js";import"./chunk-HCM5L4SG.js";import"./chunk-CUIUONOD.js";import"./chunk-F77H4ORQ.js";import"./chunk-N53BZWT6.js";import"./chunk-P5ODSPYQ.js";import"./chunk-SW3KSKPN.js";import"./chunk-V6E7LH4N.js";import"./chunk-5W26PNQB.js";import"./chunk-W2SF7KHK.js";import"./chunk-ZLJ5SRDV.js";import"./chunk-U6NXRSIJ.js";import"./chunk-JZTSMKZD.js";import"./chunk-T22ULW3M.js";import"./chunk-CVXYRGXK.js";import"./chunk-OSAEZL4I.js";import"./chunk-KVYKSDQA.js";import"./chunk-7YUUTAV6.js";import{Da as S,Db as T,L as p,Na as f,Nh as I,R as u,T as m,ba as o,ih as k,mb as b,n as l,nb as v,nh as y,ob as h,pb as g,xh as _,yh as V}from"./chunk-RKSLYOIW.js";import{a as c,b as a,i as d}from"./chunk-QQ7SJNXU.js";var R=(()=>{let r=class r{authService=o(k);userSubscription=o(n);hooks=o(I);videoService=o(O);scopedTokensService=o(y);getVideosObservableFunction=this.getVideosObservable.bind(this);getSyndicationItemsFunction=this.getSyndicationItems.bind(this);defaultSort="-publishedAt";actions=[{routerLink:"/my-library/subscriptions",label:"Administrojini",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(),u(()=>this.scopedTokensService.getScopedTokens()),m(i=>this.feedToken=i.feedToken));return l(e);}};d(r,"\u0275fac",function(i){return new(i||r)();}),d(r,"\u0275cmp",f({type:r,selectors:[["my-videos-user-subscriptions"]],decls:3,vars:5,consts:()=>{let e;return e="Video nga pajtimet tuaja",[e,[1,"visually-hidden"],["displayFilters","false","loadUserVideoPreferences","false","groupByDate","true","highlightLives","false",3,"getVideosObservableFunction","getSyndicationItemsFunction","defaultSort","disabled","headerActions"]];},template:function(i,t){i&1&&(v(0,"h1",1),T(1,0),h(),g(2,"my-videos-list",2)),i&2&&(S(2),b("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,F,A,C],children:[{path:"overview",component:w,data:{meta:{title:"Zbuloni video"},reuse:{enabled:!0,key:"videos-discover"}}},{path:"most-liked",redirectTo:"browse?scope=federated&sort=-likes"},{path:"trending",redirectTo:()=>"browse?scope=federated&sort=-"+o(_).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:"Pajtime"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:5a85df092a135682c90bae008e37ec28160e04e5f445e29af2927333ba91ffa1*///# sourceMappingURL=chunk-H4EP4RJM.js.map