import{a as b}from"./chunk-V7766DP7.js";import{b as a}from"./chunk-VP2DPH2B.js";import"./chunk-D7AFZ4PH.js";import"./chunk-7TPOLMSO.js";import{a as V}from"./chunk-RFDIS7RO.js";import"./chunk-AZPYKXFL.js";import"./chunk-XKHZ653L.js";import{a as I,b as R}from"./chunk-4GMKSIW4.js";import{$a as v,Aa as s,Bb as C,Cd as S,Ka as h,Qb as g,Rb as y,Wh as U,_a as u,aa as n,fb as l,gb as d,r as f,yd as x}from"./chunk-R4Z6ZI3L.js";import{i as m}from"./chunk-P6NJDXIL.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="URL-Parameter fehlt in URL-Parametern";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="Kein Zugriff auf die Remote-Ressource m\xF6glich";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:"Remote Interaktion"}}}];export{J as default};/**i18n:138e9aba5923606215625ab5641fbdc103d8a34cfe13ae910386f40f27aea675*///# sourceMappingURL=chunk-SPKYT64E.js.map