import{a as P,b as w,c as M}from"./chunk-ZDXCNLRU.js";import{a as E}from"./chunk-7R2JLBD2.js";import{a as n}from"./chunk-43ADV2ZJ.js";import"./chunk-YJBOIRVY.js";import"./chunk-AL3JY7FR.js";import"./chunk-R4LARN3F.js";import"./chunk-RL5ITQSK.js";import"./chunk-OCKO2KXU.js";import{c as F,g as C,h as A}from"./chunk-KTNNYJPT.js";import"./chunk-WDJVNN5A.js";import"./chunk-YMGIUQFU.js";import"./chunk-564SGFOD.js";import"./chunk-C5DTCG7Q.js";import"./chunk-DBTSZ35P.js";import"./chunk-ZPH5XKKH.js";import"./chunk-7AZANUX7.js";import"./chunk-7XM32PRW.js";import"./chunk-74XU6JWD.js";import"./chunk-62QCAIAG.js";import"./chunk-WZW63ASJ.js";import"./chunk-F5KVMCI7.js";import"./chunk-O4EPL27S.js";import"./chunk-T5YWTKHD.js";import"./chunk-YKHRMVTQ.js";import{c as O}from"./chunk-FVCBIAGO.js";import"./chunk-WJWVIVJ3.js";import"./chunk-NHQYZPBX.js";import"./chunk-S3ZZZ33Q.js";import"./chunk-S5GU54WU.js";import"./chunk-BPIWVNKO.js";import"./chunk-CAOKLG3V.js";import"./chunk-SQS6I7IC.js";import"./chunk-VJAHHR4M.js";import"./chunk-5ELYP5LL.js";import"./chunk-NJIE36EQ.js";import"./chunk-ZDA6S5XE.js";import"./chunk-POE3X42R.js";import"./chunk-WGZO2KEB.js";import"./chunk-3UFUNGHF.js";import"./chunk-7RXEKJPE.js";import"./chunk-ZPYT6WL3.js";import"./chunk-UIT7CBMO.js";import"./chunk-UFYABIEV.js";import{Ca as S,Hh as I,K as p,Ka as f,Q as u,S as m,aa as o,ch as k,hb as b,hh as y,ib as v,jb as h,kb as g,m as l,rh as _,sh as V,yb as T}from"./chunk-6YFOH76E.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:"Manage",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="Zure harpidetzetako bideoak",[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:"Aurkitu bideoak"},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:"Harpidetzak"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:5a85df092a135682c90bae008e37ec28160e04e5f445e29af2927333ba91ffa1*///# sourceMappingURL=chunk-77IN46JJ.js.map