import{A as y}from"./chunk-VMPGITBT.js";import{C as _,a as I,g as S,n as M}from"./chunk-Y4WF5HJS.js";import{Ka as d,Sh as w,Wb as u,X as r,Xb as c,Yb as h,aa as v,cc as f,eb as a,fb as p,gb as m,yc as C,zb as g}from"./chunk-R4Z6ZI3L.js";import{i as l}from"./chunk-P6NJDXIL.js";var A=(()=>{let e=class e{inputId=C.required();scopeItems;selectedId;ngOnInit(){this.buildScopeItems();}buildScopeItems(){this.scopeItems=[{id:"local",label:"\u3053\u306E\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u306E\u52D5\u753B\u306E\u307F"},{id:"federated",label:"\u5168\u3066\u306E\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u306E\u52D5\u753B\u3092\u5BFE\u8C61\u306B\u3059\u308B"}];}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\u8FFD\u52A0"},{id:"-originallyPublishedAt",label:"\u30AA\u30EA\u30B8\u30CA\u30EB\u306E\u516C\u958B\u65E5"},{id:"name",label:"\u540D\u524D"}],this.isTrendingSortEnabled("most-viewed")&&this.sortItems.push({id:"-trending",label:"\u6700\u8FD1\u8996\u8074"}),this.isTrendingSortEnabled("hot")&&this.sortItems.push({id:"-hot",label:"\u8A71\u984C"}),this.isTrendingSortEnabled("most-liked")&&this.sortItems.push({id:"-likes",label:"\u8A55\u4FA1\uFF08\u9AD8\u8A55\u4FA1\u30FB\u4F4E\u8A55\u4FA1\u306E\u5408\u7B97\uFF09"}),this.sortItems.push({id:"-views",label:"\u30B0\u30ED\u30FC\u30D0\u30EB\u306A\u8996\u8074\u56DE\u6570"});}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:138e9aba5923606215625ab5641fbdc103d8a34cfe13ae910386f40f27aea675*///# sourceMappingURL=chunk-IPQEGA5G.js.map