import{h as y}from"./chunk-NHQYZPBX.js";import{D as _,a as I,g as S,n as M}from"./chunk-ZPYT6WL3.js";import{$b as h,Cb as g,Ka as d,X as r,Zb as u,_b as c,aa as v,fc as f,hb as a,ib as p,jb as m,oh as w,yc as C}from"./chunk-6YFOH76E.js";import{i as l}from"./chunk-QQ7SJNXU.js";var A=(()=>{let e=class e{inputId=C.required();scopeItems;selectedId;ngOnInit(){this.buildScopeItems();}buildScopeItems(){this.scopeItems=[{id:"local",label:"\u4EC5\u5305\u542B\u6765\u81EA\u6B64\u5E73\u53F0\u7684\u89C6\u9891"},{id:"federated",label:"\u6765\u81EA\u6240\u6709\u5E73\u53F0\u7684\u89C6\u9891"}];}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:"\u6700\u8FD1\u6DFB\u52A0"},{id:"-originallyPublishedAt",label:"\u539F\u59CB\u53D1\u5E03\u65E5\u671F"},{id:"name",label:"\u540D\u79F0"}],this.isTrendingSortEnabled("most-viewed")&&this.sortItems.push({id:"-trending",label:"\u6700\u8FD1\u6D4F\u89C8"}),this.isTrendingSortEnabled("hot")&&this.sortItems.push({id:"-hot",label:"\u70ED\u7684"}),this.isTrendingSortEnabled("most-liked")&&this.sortItems.push({id:"-likes",label:"\u559C\u6B22\u6570"}),this.sortItems.push({id:"-views",label:"\u5168\u5C40\u89C6\u56FE"});}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:5a85df092a135682c90bae008e37ec28160e04e5f445e29af2927333ba91ffa1*///# sourceMappingURL=chunk-YJBOIRVY.js.map