import{a as A}from"./chunk-SQDB2HVZ.js";import{b as a}from"./chunk-OVGY4AYU.js";import{b as z}from"./chunk-37RB6Z6A.js";import"./chunk-QQS3O2A6.js";import{a as b}from"./chunk-BEGTVY6X.js";import"./chunk-N4XHT5GQ.js";import"./chunk-PLOPVPVA.js";import{d as V}from"./chunk-E3FPDMTA.js";import{a as R}from"./chunk-SMO6IFQB.js";import{Bb as g,Fc as x,Ga as s,Gh as U,Ob as y,Pb as C,Ra as h,Xa as u,aa as n,db as v,mb as l,nb as p,nd as I,r as f,rd as S}from"./chunk-2GYONVCW.js";import{i as c}from"./chunk-6PUAHDUH.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-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 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="Kein Zugriff auf die Remote-Ressource m\xF6glich";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:"Remote Interaktion"}}}];export{K as default};/**i18n:7c691147a9ded88b46d9cd2285c6afa220006ce26eb0d02eb4522192723b6cd8*///# sourceMappingURL=chunk-UGIQOPWS.js.map