import{A as b}from"./chunk-ESBU7OHQ.js";import{C as y,a as S,g as M,n as _}from"./chunk-AWFGIQSJ.js";import{Cb as c,Gh as T,Rc as I,Sa as a,Wb as u,X as l,Xb as h,Yb as f,aa as w,ac as C,eb as p,ob as m,pb as g,ta as d}from"./chunk-GKQGDBUU.js";import{i as r}from"./chunk-QVFSZZWQ.js";var L=(()=>{let e=class e{inputId=d.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=t=>{};writeValue(t){this.selectedId=t;}registerOnChange(t){this.propagateChange=t;}registerOnTouched(){}onModelChange(){this.propagateChange(this.selectedId);}};r(e,"\u0275fac",function(o){return new(o||e)();}),r(e,"\u0275cmp",a({type:e,selectors:[["my-select-videos-scope"]],inputs:{inputId:[1,"inputId"]},features:[C([{provide:S,useExisting:l(()=>e),multi:!0}])],decls:1,vars:3,consts:[[3,"ngModelChange","inputId","items","ngModel"]],template:function(o,i){o&1&&(m(0,"my-select-options",0),f("ngModelChange",function(s){return h(i.selectedId,s)||(i.selectedId=s),s;}),c("ngModelChange",function(){return i.onModelChange();}),g()),o&2&&(p("inputId",i.inputId())("items",i.scopeItems),u("ngModel",i.selectedId));},dependencies:[y,M,_,I,b],encapsulation:2}));let n=e;return n;})();var B=(()=>{let e=class e{server=w(T);inputId=d.required();sortItems;selectedId;serverConfig;ngOnInit(){this.serverConfig=this.server.getHTMLConfig(),this.buildSortItems();}buildSortItems(){this.sortItems=[{id:"-publishedAt",label:"Recently Added"},{id:"-originallyPublishedAt",label:"Original Publication Date"},{id:"name",label:"Name"}],this.isTrendingSortEnabled("most-viewed")&&this.sortItems.push({id:"-trending",label:"Recent Views"}),this.isTrendingSortEnabled("hot")&&this.sortItems.push({id:"-hot",label:"Hot"}),this.isTrendingSortEnabled("most-liked")&&this.sortItems.push({id:"-likes",label:"Likes"}),this.sortItems.push({id:"-views",label:"Global Views"});}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);}};r(e,"\u0275fac",function(o){return new(o||e)();}),r(e,"\u0275cmp",a({type:e,selectors:[["my-select-videos-sort"]],inputs:{inputId:[1,"inputId"]},features:[C([{provide:S,useExisting:l(()=>e),multi:!0}])],decls:1,vars:3,consts:[[3,"ngModelChange","inputId","items","ngModel"]],template:function(o,i){o&1&&(m(0,"my-select-options",0),f("ngModelChange",function(s){return h(i.selectedId,s)||(i.selectedId=s),s;}),c("ngModelChange",function(){return i.onModelChange();}),g()),o&2&&(p("inputId",i.inputId())("items",i.sortItems),u("ngModel",i.selectedId));},dependencies:[y,M,_,I,b],encapsulation:2}));let n=e;return n;})();export{L as a,B as b};/**i18n:42345378061bf3c93df67acfa161b751a7b03cc91f3ede7c1f1cdf2bba62fe26*///# sourceMappingURL=chunk-BQVRHZWR.js.map