import{h as y}from"./chunk-FU5SUIXP.js";import{E as _,a as I,g as S,o as M}from"./chunk-5Y6FVWZJ.js";import{Ec as C,Hb as g,Na as d,Y as r,ba as v,cc as u,dc as c,ec as h,kc as f,mb as a,nb as p,ob as m,uh as w}from"./chunk-7XPKW7E5.js";import{i as l}from"./chunk-SNJLK5AI.js";var A=(()=>{let e=class e{inputId=C.required();scopeItems;selectedId;ngOnInit(){this.buildScopeItems();}buildScopeItems(){this.scopeItems=[{id:"local",label:"Vain t\xE4m\xE4n alustan videot"},{id:"federated",label:"Kaikkien alustojen videot"}];}propagateChange=t=>{};writeValue(t){this.selectedId=t;}registerOnChange(t){this.propagateChange=t;}registerOnTouched(){}onModelChange(){this.propagateChange(this.selectedId);}};l(e,"\u0275fac",function(o){return new(o||e)();}),l(e,"\u0275cmp",d({type:e,selectors:[["my-select-videos-scope"]],inputs:{inputId:[1,"inputId"]},features:[f([{provide:I,useExisting:r(()=>e),multi:!0}])],decls:1,vars:3,consts:[[3,"ngModelChange","inputId","items","ngModel"]],template:function(o,i){o&1&&(p(0,"my-select-options",0),h("ngModelChange",function(s){return c(i.selectedId,s)||(i.selectedId=s),s;}),g("ngModelChange",function(){return i.onModelChange();}),m()),o&2&&(a("inputId",i.inputId())("items",i.scopeItems),u("ngModel",i.selectedId));},dependencies:[_,S,M,y],encapsulation:2}));let n=e;return n;})();var k=(()=>{let e=class e{server=v(w);inputId=C.required();sortItems;selectedId;serverConfig;ngOnInit(){this.serverConfig=this.server.getHTMLConfig(),this.buildSortItems();}buildSortItems(){this.sortItems=[{id:"-publishedAt",label:"Viimeksi lis\xE4tyt"},{id:"-originallyPublishedAt",label:"P\xE4iiv\xE4m\xE4\xE4r\xE4"},{id:"name",label:"Nimi"}],this.isTrendingSortEnabled("most-viewed")&&this.sortItems.push({id:"-trending",label:"Viimeksi katseltu"}),this.isTrendingSortEnabled("hot")&&this.sortItems.push({id:"-hot",label:"Kuuma"}),this.isTrendingSortEnabled("most-liked")&&this.sortItems.push({id:"-likes",label:"Tykk\xE4ykset"}),this.sortItems.push({id:"-views",label:"Globaalit katselukerrat"});}isTrendingSortEnabled(t){return this.serverConfig.trending.videos.algorithms.enabled.includes(t);}propagateChange=t=>{};writeValue(t){this.selectedId=t;}registerOnChange(t){this.propagateChange=t;}registerOnTouched(){}onModelChange(){this.propagateChange(this.selectedId);}};l(e,"\u0275fac",function(o){return new(o||e)();}),l(e,"\u0275cmp",d({type:e,selectors:[["my-select-videos-sort"]],inputs:{inputId:[1,"inputId"]},features:[f([{provide:I,useExisting:r(()=>e),multi:!0}])],decls:1,vars:3,consts:[[3,"ngModelChange","inputId","items","ngModel"]],template:function(o,i){o&1&&(p(0,"my-select-options",0),h("ngModelChange",function(s){return c(i.selectedId,s)||(i.selectedId=s),s;}),g("ngModelChange",function(){return i.onModelChange();}),m()),o&2&&(a("inputId",i.inputId())("items",i.sortItems),u("ngModel",i.selectedId));},dependencies:[_,S,M,y],encapsulation:2}));let n=e;return n;})();export{A as a,k as b};/**i18n:8bbaae6e8f892c770558263409b04864bea4163b0f68bbe3358622c96ded4382*///# sourceMappingURL=chunk-KS7VDFD4.js.map