import{Da as e5,Eo as kb,Gr as Va,Io as lA,Is as rh,Lr as Uj,Oi as Zt,Oo as kj,Qr as W$,Wa as g,Za as gx,_s as ph,gc as wf,ua as cA,vc as wp}from"./chunk-B_pj7Jpm.js";import{A as qn,O as ln,r as D,s as Jn}from"./chunk-BPHMC4rz.js";import{c as oi}from"./chunk-CEibY8iL.js";var O=class i{inputId=ph.required();scopeItems;selectedId;ngOnInit(){this.buildScopeItems()}buildScopeItems(){this.scopeItems=[{id:`local`,label:"Iba videá z tejto platformy"},{id:`federated`,label:"Videá zo všetkých platforiem"}]}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=Va({type:i,selectors:[[`my-select-videos-scope`]],inputs:{inputId:[1,`inputId`]},features:[e5([{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),lA(`ngModelChange`,function(n){return W$(t.selectedId,n)||(t.selectedId=n),n}),rh(`ngModelChange`,function(){return t.onModelChange()}),kb(),kj()),o&2&&(gx(`inputId`,t.inputId())(`items`,t.scopeItems),cA(`ngModel`,t.selectedId),Uj())},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:"Nedávno pridané"},{id:`-originallyPublishedAt`,label:"Pôvodný dátum zverejnenia"},{id:`name`,label:"Meno"}],this.isTrendingSortEnabled(`most-viewed`)&&this.sortItems.push({id:`-trending`,label:"Nedávno prezreté"}),this.isTrendingSortEnabled(`hot`)&&this.sortItems.push({id:`-hot`,label:"Horúce"}),this.isTrendingSortEnabled(`most-liked`)&&this.sortItems.push({id:`-likes`,label:"Páči sa mi"}),this.sortItems.push({id:`-views`,label:"Globálne pozretia"})}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=Va({type:i,selectors:[[`my-select-videos-sort`]],inputs:{inputId:[1,`inputId`]},features:[e5([{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),lA(`ngModelChange`,function(n){return W$(t.selectedId,n)||(t.selectedId=n),n}),rh(`ngModelChange`,function(){return t.onModelChange()}),kb(),kj()),o&2&&(gx(`inputId`,t.inputId())(`items`,t.sortItems),cA(`ngModel`,t.selectedId),Uj())},dependencies:[Jn,qn,ln,oi],encapsulation:2,changeDetection:1})};export{w as n,O as t};
//# debugId=9c46acd7-75a8-5ab4-901b-71c3fa84beb6
//# sourceMappingURL=chunk-Boe1xg5G2.js.map