import{A as y}from"./chunk-YAB4XGIF.js";import{C as _,a as I,g as S,n as M}from"./chunk-KXBVYXHU.js";import{Ka as d,Qh as w,Wb as u,X as r,Xb as c,Yb as h,aa as v,cc as f,eb as a,fb as p,gb as m,yc as C,zb as g}from"./chunk-THW6YIIG.js";import{i as l}from"./chunk-PTJGHD3V.js";var A=(()=>{let e=class e{inputId=C.required();scopeItems;selectedId;ngOnInit(){this.buildScopeItems();}buildScopeItems(){this.scopeItems=[{id:"local",label:"S\xF3 v\xEDdeos desta plataforma"},{id:"federated",label:"V\xEDdeos de todas as plataformas"}];}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:"Engadidos recentemente"},{id:"-originallyPublishedAt",label:"Data orixinal de publicaci\xF3n"},{id:"name",label:"Nome"}],this.isTrendingSortEnabled("most-viewed")&&this.sortItems.push({id:"-trending",label:"Visualizaci\xF3ns recentes"}),this.isTrendingSortEnabled("hot")&&this.sortItems.push({id:"-hot",label:"Popularidade"}),this.isTrendingSortEnabled("most-liked")&&this.sortItems.push({id:"-likes",label:"Gustado"}),this.sortItems.push({id:"-views",label:"Visualizaci\xF3ns totais"});}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:90f1dd82a779b57eddc91ef20913c88eecaa9632bba8ac04ad50f47ae2b82df7*///# sourceMappingURL=chunk-4IZPLX3W.js.map