import{a as A}from"./chunk-6GDVAMX4.js";import{b as a}from"./chunk-AMFGF7SM.js";import{b as z}from"./chunk-3BVYQMA5.js";import"./chunk-EK7PNUS6.js";import{a as b}from"./chunk-P6IZY6NM.js";import"./chunk-XP52Z2T6.js";import"./chunk-SZCJAQSZ.js";import{d as V}from"./chunk-FRUNJAEM.js";import{a as R}from"./chunk-NHKGWW2Q.js";import{Eb as g,Fc as x,Ha as s,Rb as y,Sa as h,Sb as C,Za as u,ba as n,gb as v,ld as I,pb as l,pd as S,qb as p,s as f,yg as U}from"./chunk-7W5IJG57.js";import{i as c}from"./chunk-RB5FWREQ.js";function $(o,e){if(o&1&&(l(0,"my-alert",2),y(1),p()),o&2){let _=g();s(),C(_.error);}}var L=(()=>{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=V.buildWatchUrl(d);}else if(i.data.length!==0)m="/c/"+new R(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 K=[{path:"",component:L,providers:[A,a,z],canActivate:[U],data:{meta:{title:"T\xE1voli interakci\xF3"}}}];export{K as default};/**i18n:3558f4fa3a6acf6a8a484a0589828971efacd00f9f89386e64ec00a5fc269cc5*///# sourceMappingURL=chunk-JXUKW43A.js.map