import{Ca as dA,Hi as Zt,Ja as g,Ns as rh,Ra as f5,_s as ph,ai as Vj,gt as Ex,jt as Gj,k as Bb,s as $a,ss as o5,vc as wf,yc as wp,za as fA}from"./chunk-b0nJCs5_.js";import{A as qn,O as ln,r as D,s as Jn}from"./chunk-Cmet2Nw-.js";import{c as oi}from"./chunk-q-6uNE4L.js";var O=class i{inputId=ph.required();scopeItems;selectedId;ngOnInit(){this.buildScopeItems()}buildScopeItems(){this.scopeItems=[{id:`local`,label:"Solo vídeos de esta plataforma"},{id:`federated`,label:"Vídeos de todas las plataformas"}]}propagateChange=e=>{};writeValue(e){this.selectedId=e}registerOnChange(e){this.propagateChange=e}registerOnTouched(){}onModelChange(){this.propagateChange(this.selectedId)}static ɵfac=function(o){return new(o||i)};static ɵcmp=$a({type:i,selectors:[[`my-select-videos-scope`]],inputs:{inputId:[1,`inputId`]},features:[f5([{provide:D,useExisting:wf(()=>i),multi:!0}])],decls:1,vars:3,consts:[[3,`ngModelChange`,`inputId`,`items`,`ngModel`]],template:function(o,t){o&1&&(wp(0,`my-select-options`,0),fA(`ngModelChange`,function(n){return o5(t.selectedId,n)||(t.selectedId=n),n}),rh(`ngModelChange`,function(){return t.onModelChange()}),Bb(),Vj()),o&2&&(Ex(`inputId`,t.inputId())(`items`,t.scopeItems),dA(`ngModel`,t.selectedId),Gj())},dependencies:[Jn,qn,ln,oi],encapsulation:2,changeDetection:1})};var w=class i{server=g(Zt);inputId=ph.required();sortItems;selectedId;serverConfig;ngOnInit(){this.serverConfig=this.server.getHTMLConfig(),this.buildSortItems()}buildSortItems(){this.sortItems=[{id:`-publishedAt`,label:"Añadido Recientemente"},{id:`-originallyPublishedAt`,label:"Fecha de Publicación Original"},{id:`name`,label:"Nombre"}],this.isTrendingSortEnabled(`most-viewed`)&&this.sortItems.push({id:`-trending`,label:"Visualizaciones recientes"}),this.isTrendingSortEnabled(`hot`)&&this.sortItems.push({id:`-hot`,label:"Caliente"}),this.isTrendingSortEnabled(`most-liked`)&&this.sortItems.push({id:`-likes`,label:"Gustan"}),this.sortItems.push({id:`-views`,label:"Visualizaciones Globales"})}isTrendingSortEnabled(e){return this.serverConfig.trending.videos.algorithms.enabled.includes(e)}propagateChange=e=>{};writeValue(e){this.selectedId=e}registerOnChange(e){this.propagateChange=e}registerOnTouched(){}onModelChange(){this.propagateChange(this.selectedId)}static ɵfac=function(o){return new(o||i)};static ɵcmp=$a({type:i,selectors:[[`my-select-videos-sort`]],inputs:{inputId:[1,`inputId`]},features:[f5([{provide:D,useExisting:wf(()=>i),multi:!0}])],decls:1,vars:3,consts:[[3,`ngModelChange`,`inputId`,`items`,`ngModel`]],template:function(o,t){o&1&&(wp(0,`my-select-options`,0),fA(`ngModelChange`,function(n){return o5(t.selectedId,n)||(t.selectedId=n),n}),rh(`ngModelChange`,function(){return t.onModelChange()}),Bb(),Vj()),o&2&&(Ex(`inputId`,t.inputId())(`items`,t.sortItems),dA(`ngModel`,t.selectedId),Gj())},dependencies:[Jn,qn,ln,oi],encapsulation:2,changeDetection:1})};export{w as n,O as t};
//# debugId=321dbe66-d81e-51dd-b539-ac086ff1d130
//# sourceMappingURL=chunk-CqZshDR4.js.map