import{A as y}from"./chunk-RC2N7LYX.js";import{C as _,a as I,g as S,n as M}from"./chunk-UVFMJH3U.js";import{Bb as g,La as d,X as r,Xh as w,Yb as u,Zb as c,_b as h,aa as v,ec as f,gb as a,hb as p,ib as m,xc as C}from"./chunk-HJJWL6RD.js";import{i as l}from"./chunk-H2BCKOF6.js";var A=(()=>{let e=class e{inputId=C.required();scopeItems;selectedId;ngOnInit(){this.buildScopeItems();}buildScopeItems(){this.scopeItems=[{id:"local",label:"T\u1EEB m\xE1y ch\u1EE7 n\xE0y"},{id:"federated",label:"T\u1EEB m\u1ECDi m\xE1y ch\u1EE7"}];}propagateChange=t=>{};writeValue(t){this.selectedId=t;}registerOnChange(t){this.propagateChange=t;}registerOnTouched(){}onModelChange(){this.propagateChange(this.selectedId);}};l(e,"\u0275fac",function(o){return new(o||e)();}),l(e,"\u0275cmp",d({type:e,selectors:[["my-select-videos-scope"]],inputs:{inputId:[1,"inputId"]},features:[f([{provide:I,useExisting:r(()=>e),multi:!0}])],decls:1,vars:3,consts:[[3,"ngModelChange","inputId","items","ngModel"]],template:function(o,i){o&1&&(p(0,"my-select-options",0),h("ngModelChange",function(s){return c(i.selectedId,s)||(i.selectedId=s),s;}),g("ngModelChange",function(){return i.onModelChange();}),m()),o&2&&(a("inputId",i.inputId())("items",i.scopeItems),u("ngModel",i.selectedId));},dependencies:[_,S,M,y],encapsulation:2}));let n=e;return n;})();var k=(()=>{let e=class e{server=v(w);inputId=C.required();sortItems;selectedId;serverConfig;ngOnInit(){this.serverConfig=this.server.getHTMLConfig(),this.buildSortItems();}buildSortItems(){this.sortItems=[{id:"-publishedAt",label:"Ng\xE0y t\u1EA3i l\xEAn"},{id:"-originallyPublishedAt",label:"Ng\xE0y c\xF4ng chi\u1EBFu"},{id:"name",label:"T\xEAn"}],this.isTrendingSortEnabled("most-viewed")&&this.sortItems.push({id:"-trending",label:"X\u1EBFp h\u1EA1ng"}),this.isTrendingSortEnabled("hot")&&this.sortItems.push({id:"-hot",label:"Th\u1ECBnh h\xE0nh"}),this.isTrendingSortEnabled("most-liked")&&this.sortItems.push({id:"-likes",label:"L\u01B0\u1EE3t th\xEDch"}),this.sortItems.push({id:"-views",label:"L\u01B0\u1EE3t xem"});}isTrendingSortEnabled(t){return this.serverConfig.trending.videos.algorithms.enabled.includes(t);}propagateChange=t=>{};writeValue(t){this.selectedId=t;}registerOnChange(t){this.propagateChange=t;}registerOnTouched(){}onModelChange(){this.propagateChange(this.selectedId);}};l(e,"\u0275fac",function(o){return new(o||e)();}),l(e,"\u0275cmp",d({type:e,selectors:[["my-select-videos-sort"]],inputs:{inputId:[1,"inputId"]},features:[f([{provide:I,useExisting:r(()=>e),multi:!0}])],decls:1,vars:3,consts:[[3,"ngModelChange","inputId","items","ngModel"]],template:function(o,i){o&1&&(p(0,"my-select-options",0),h("ngModelChange",function(s){return c(i.selectedId,s)||(i.selectedId=s),s;}),g("ngModelChange",function(){return i.onModelChange();}),m()),o&2&&(a("inputId",i.inputId())("items",i.sortItems),u("ngModel",i.selectedId));},dependencies:[_,S,M,y],encapsulation:2}));let n=e;return n;})();export{A as a,k as b};/**i18n:671d995daee9c68b73ac729b7ab2c3cf3be32c7f1a24d9dfa94e261c45ee5241*///# sourceMappingURL=chunk-KHDHASYR.js.map