import{a as b}from"./chunk-QWHXHXRF.js";import{b as a}from"./chunk-CV4VFWGM.js";import"./chunk-4LRKKRXP.js";import"./chunk-YA2OBXRO.js";import{a as V}from"./chunk-KKQXMHTD.js";import"./chunk-TPPCH2AE.js";import"./chunk-Z2LF35UH.js";import{a as I,b as R}from"./chunk-2SQVKV5D.js";import{Da as s,Gd as x,Jb as C,Kd as S,Na as h,Yb as g,Zb as y,ba as n,gb as u,hb as v,nb as l,ob as d,s as f,zh as U}from"./chunk-OTZZLUAJ.js";import{i as m}from"./chunk-XYZYVFXE.js";function L(o,e){if(o&1&&(l(0,"my-alert",1),g(1),d()),o&2){let A=C();s(),y(A.error);}}var z=(()=>{let e=class e{route=n(x);router=n(S);search=n(a);error="";ngOnInit(){let t=this.route.snapshot.queryParams.uri;if(!t){this.error="V URL ch\xFDba URL parameter";return;}this.loadUrl(t);}loadUrl(t){f([this.search.searchVideos({search:t}),this.search.searchVideoChannels({search:t})]).subscribe(([r,i])=>{let c;if(r.data.length!==0){let p=r.data[0];c=I.buildWatchUrl(p);}else if(i.data.length!==0)c="/c/"+new R(i.data[0]).nameWithHost;else{this.error="Vzdialen\xFD zdroj je nedostupn\xFD";return;}this.router.navigateByUrl(c);});}};m(e,"\u0275fac",function(r){return new(r||e)();}),m(e,"\u0275cmp",h({type:e,selectors:[["my-remote-interaction"]],decls:2,vars:1,consts:[[1,"root"],["type","danger"]],template:function(r,i){r&1&&(l(0,"div",0),u(1,L,2,1,"my-alert",1),d()),r&2&&(s(),v(i.error?1:-1));},dependencies:[V],encapsulation:2}));let o=e;return o;})();var J=[{path:"",component:z,providers:[b,a],canActivate:[U],data:{meta:{title:"Vzdialen\xE1 interakcia"}}}];export{J as default};/**i18n:4caeb8e7a09648a9cf35d6229af8a685b503a6e2123779e5b0c4fb7602981338*///# sourceMappingURL=chunk-T6SRC4PM.js.map