import{K as qp,b as Pa,ah as u$,bP as D,bQ as af,g,$ as $t,J as Jn,q as qn,l as ln,as as Yl,s as sp,O as Ox,e as Fp,d as lb,m as zH,a3 as H0,u as Mx,y as qH,t as t$}from'./main-DEZ5cZzu.js';var A=(()=>{class i{inputId=qp.required();scopeItems;selectedId;ngOnInit(){this.buildScopeItems();}buildScopeItems(){this.scopeItems=[{id:"local",label:"Only videos from this platform"},{id:"federated",label:"Videos from all platforms"}];}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:[u$([{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),Ox("ngModelChange",function(n){return t$(t.selectedId,n)||(t.selectedId=n),n;}),Fp("ngModelChange",function(){return t.onModelChange();}),lb(),zH()),o&2&&(H0("inputId",t.inputId())("items",t.scopeItems),Mx("ngModel",t.selectedId),qH());},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:"\u0623\u064F\u0636\u064A\u0641 \u062D\u062F\u064A\u062B\u064B\u0627"},{id:"-originallyPublishedAt",label:"\u062A\u0627\u0631\u064A\u062E \u0627\u0644\u0646\u0634\u0631 \u0627\u0644\u0623\u0635\u0644\u064A"},{id:"name",label:"\u0627\u0644\u0627\u0633\u0645"}],this.isTrendingSortEnabled("most-viewed")&&this.sortItems.push({id:"-trending",label:"\u0645\u0634\u0627\u0647\u062F\u0627\u062A \u062D\u062F\u064A\u062B\u0629"}),this.isTrendingSortEnabled("hot")&&this.sortItems.push({id:"-hot",label:"\u0631\u0627\u0626\u062C"}),this.isTrendingSortEnabled("most-liked")&&this.sortItems.push({id:"-likes",label:"\u0627\u0644\u0625\u0639\u062C\u0627\u0628\u0627\u062A"}),this.sortItems.push({id:"-views",label:"\u0645\u0634\u0627\u0647\u062F\u0627\u062A \u0639\u0627\u0644\u0645\u064A\u0629"});}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:[u$([{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),Ox("ngModelChange",function(n){return t$(t.selectedId,n)||(t.selectedId=n),n;}),Fp("ngModelChange",function(){return t.onModelChange();}),lb(),zH()),o&2&&(H0("inputId",t.inputId())("items",t.sortItems),Mx("ngModel",t.selectedId),qH());},dependencies:[Jn,qn,ln,Yl],encapsulation:2,changeDetection:1});}return i;})();/**i18n:c8855ca17fb20171aa9dd43d012e42547cb1f0cfd9c21d4dc05679bbbdf5ccb8*/export{A,G};//# sourceMappingURL=chunk-CoFxqtb1.js.map