import{h as y}from"./chunk-7SI2OHLV.js";import{E as _,a as I,g as S,o as M}from"./chunk-OPKDC23H.js";import{Ec as C,Hb as g,Na as d,Y as r,ba as v,cc as u,dc as c,ec as h,kc as f,mb as a,nb as p,ob as m,vh as w}from"./chunk-ZSQR4KTU.js";import{i as l}from"./chunk-IQVXR75E.js";var A=(()=>{let e=class e{inputId=C.required();scopeItems;selectedId;ngOnInit(){this.buildScopeItems();}buildScopeItems(){this.scopeItems=[{id:"local",label:"\uC774 \uD50C\uB7AB\uD3FC\uC758 \uB3D9\uC601\uC0C1\uB9CC"},{id:"federated",label:"\uBAA8\uB4E0 \uD50C\uB7AB\uD3FC\uC758 \uB3D9\uC601\uC0C1"}];}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:"\uCD5C\uADFC \uCD94\uAC00"},{id:"-originallyPublishedAt",label:"\uCD5C\uCD08 \uAC8C\uC2DC\uC77C"},{id:"name",label:"\uC774\uB984"}],this.isTrendingSortEnabled("most-viewed")&&this.sortItems.push({id:"-trending",label:"\uCD5C\uADFC \uC870\uD68C\uC218"}),this.isTrendingSortEnabled("hot")&&this.sortItems.push({id:"-hot",label:"\uC778\uAE30"}),this.isTrendingSortEnabled("most-liked")&&this.sortItems.push({id:"-likes",label:"\uC88B\uC544\uC694"}),this.sortItems.push({id:"-views",label:"\uAE00\uB85C\uBC8C \uC870\uD68C\uC218"});}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:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*///# sourceMappingURL=chunk-5XB5DOPP.js.map