import{a as z}from"./chunk-XTWCK3HF.js";import{b as a}from"./chunk-MYFUY6O2.js";import"./chunk-X56LARPA.js";import"./chunk-V4YGGZ4W.js";import{a as b}from"./chunk-PBWCQDPD.js";import"./chunk-DGPQDLRR.js";import"./chunk-X3SPFC3P.js";import{a as R,b as V}from"./chunk-ITB6MN7G.js";import{Db as g,Ha as s,Ic as x,Kh as U,Qb as y,Rb as C,Sa as h,Ya as u,aa as n,eb as v,ob as l,pb as p,pd as I,r as f,td as S}from"./chunk-GKQGDBUU.js";import{i as c}from"./chunk-QVFSZZWQ.js";function _(o,e){if(o&1&&(l(0,"my-alert",2),y(1),p()),o&2){let L=g();s(),C(L.error);}}var A=(()=>{let e=class e{route=n(I);router=n(S);search=n(a);error="";ngOnInit(){let t=this.route.snapshot.queryParams.uri;if(!t){this.error="URL param\xE9ter hi\xE1nyzik az URL param\xE9terekb\u0151l";return;}this.loadUrl(t);}loadUrl(t){f([this.search.searchVideos({search:t}),this.search.searchVideoChannels({search:t})]).subscribe(([r,i])=>{let m;if(r.data.length!==0){let d=r.data[0];m=R.buildWatchUrl(d);}else if(i.data.length!==0)m="/c/"+new V(i.data[0]).nameWithHost;else{this.error="Nem \xE9rhet\u0151 el a t\xE1voli er\u0151forr\xE1s";return;}this.router.navigateByUrl(m);});}};c(e,"\u0275fac",function(r){return new(r||e)();}),c(e,"\u0275cmp",h({type:e,selectors:[["my-remote-interaction"]],decls:2,vars:1,consts:[[1,"root"],["type","danger",4,"ngIf"],["type","danger"]],template:function(r,i){r&1&&(l(0,"div",0),u(1,_,2,1,"my-alert",1),p()),r&2&&(s(),v("ngIf",i.error));},dependencies:[x,b],encapsulation:2}));let o=e;return o;})();var O=[{path:"",component:A,providers:[z,a],canActivate:[U],data:{meta:{title:"T\xE1voli interakci\xF3"}}}];export{O as default};/**i18n:42345378061bf3c93df67acfa161b751a7b03cc91f3ede7c1f1cdf2bba62fe26*///# sourceMappingURL=chunk-5DU5GGSE.js.map