import{L as qp,b as Pa,ah as c$,bP as D,bQ as af,g,$ as $t,J as Jn,q as qn,l as ln,as as Yl,s as sp,n as Mx,F as Fp,u as ub,t as GH,a3 as B0,N as Nx,W as WH,p as e$}from'./main-BiUBeaMj.js';var A=(()=>{class i{inputId=qp.required();scopeItems;selectedId;ngOnInit(){this.buildScopeItems();}buildScopeItems(){this.scopeItems=[{id:"local",label:"\u0412\u0438\u0434\u0435\u043E \u0442\u043E\u043B\u044C\u043A\u043E \u0441 \u044D\u0442\u043E\u0439 \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u044B"},{id:"federated",label:"\u0412\u0438\u0434\u0435\u043E \u0441\u043E \u0432\u0441\u0435\u0445 \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C"}];}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=Pa({type:i,selectors:[["my-select-videos-scope"]],inputs:{inputId:[1,"inputId"]},features:[c$([{provide:D,useExisting:af(()=>i),multi:true}])],decls:1,vars:3,consts:[[3,"ngModelChange","inputId","items","ngModel"]],template:function(o,t){o&1&&(sp(0,"my-select-options",0),Mx("ngModelChange",function(n){return e$(t.selectedId,n)||(t.selectedId=n),n;}),Fp("ngModelChange",function(){return t.onModelChange();}),ub(),GH()),o&2&&(B0("inputId",t.inputId())("items",t.scopeItems),Nx("ngModel",t.selectedId),WH());},dependencies:[Jn,qn,ln,Yl],encapsulation:2,changeDetection:1});}return i;})();var G=(()=>{class i{server=g($t);inputId=qp.required();sortItems;selectedId;serverConfig;ngOnInit(){this.serverConfig=this.server.getHTMLConfig(),this.buildSortItems();}buildSortItems(){this.sortItems=[{id:"-publishedAt",label:"\u041D\u0435\u0434\u0430\u0432\u043D\u043E \u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0435"},{id:"-originallyPublishedAt",label:"\u0414\u0430\u0442\u0430 \u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438"},{id:"name",label:"\u0418\u043C\u044F"}],this.isTrendingSortEnabled("most-viewed")&&this.sortItems.push({id:"-trending",label:"\u041D\u0435\u0434\u0430\u0432\u043D\u0438\u0435 \u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u044B"}),this.isTrendingSortEnabled("hot")&&this.sortItems.push({id:"-hot",label:"\u0413\u043E\u0440\u044F\u0447\u0438\u0435"}),this.isTrendingSortEnabled("most-liked")&&this.sortItems.push({id:"-likes",label:"\u041D\u0440\u0430\u0432\u0438\u0442\u0441\u044F"}),this.sortItems.push({id:"-views",label:"\u0413\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u044B\u0435 \u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u044B"});}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=Pa({type:i,selectors:[["my-select-videos-sort"]],inputs:{inputId:[1,"inputId"]},features:[c$([{provide:D,useExisting:af(()=>i),multi:true}])],decls:1,vars:3,consts:[[3,"ngModelChange","inputId","items","ngModel"]],template:function(o,t){o&1&&(sp(0,"my-select-options",0),Mx("ngModelChange",function(n){return e$(t.selectedId,n)||(t.selectedId=n),n;}),Fp("ngModelChange",function(){return t.onModelChange();}),ub(),GH()),o&2&&(B0("inputId",t.inputId())("items",t.sortItems),Nx("ngModel",t.selectedId),WH());},dependencies:[Jn,qn,ln,Yl],encapsulation:2,changeDetection:1});}return i;})();/**i18n:fad79908930cbb4c308e7550a5fe49bb3841dbb330066a6429aebaa006173605*/export{A,G};//# sourceMappingURL=chunk-DmAsi_9m.js.map