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:"Somente vídeos desta plataforma"},{id:`federated`,label:"Vídeos de todas as 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:"Adicionado recentemente"},{id:`-originallyPublishedAt`,label:"Data de publicação original"},{id:`name`,label:"Nome"}],this.isTrendingSortEnabled(`most-viewed`)&&this.sortItems.push({id:`-trending`,label:"Visualizações recentes"}),this.isTrendingSortEnabled(`hot`)&&this.sortItems.push({id:`-hot`,label:"Quente"}),this.isTrendingSortEnabled(`most-liked`)&&this.sortItems.push({id:`-likes`,label:"Curtidas"}),this.sortItems.push({id:`-views`,label:"Visões globais"})}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=84ac62b1-bb2a-5d41-8112-e20ce33e02cb
//# sourceMappingURL=chunk-CqZshDR4.js.map