import{D as CF,Do as kg,Eo as kb,Fa as eo,Gr as Va,Ia as f$,Q as EV,Qi as bV,Wa as g,as as oA,ho as j$,it as FB,nt as Et,vc as wp}from"./chunk-B_pj7Jpm.js";import{r as g$1,t as K}from"./chunk-qQMrTuzm.js";import"./chunk-CagJEiiY.js";import{t as c}from"./chunk-D7eF6KoS2.js";import"./chunk-CQiHXmZG2.js";import"./chunk-TcpfKQW12.js";import"./chunk-KfmDNYov.js";import{t as A}from"./chunk-FhARnEsq.js";import{t as p}from"./chunk-DjbsLBsJ.js";function D(o,t){if(o&1&&(wp(0,`my-alert`,1),j$(1),kb()),o&2){let e=f$();FB(),oA(e.error)}}var j=[{path:``,component:class o{route=g(eo);router=g(Et);search=g(A);error=``;ngOnInit(){let t=this.route.snapshot.queryParams.uri;if(!t){this.error="Falta el parámetro de URL en los parámetros de URL";return}this.loadUrl(t)}loadUrl(t){CF([this.search.searchVideos({search:t}),this.search.searchVideoChannels({search:t})]).subscribe(([e,n])=>{let m;if(e.data.length!==0){let l=e.data[0];m=K.buildWatchUrl(l)}else if(n.data.length!==0)m=`/c/`+new g$1(n.data[0]).nameWithHost;else{this.error="No se puede acceder al recurso remoto";return}this.router.navigateByUrl(m)})}static ɵfac=function(e){return new(e||o)};static ɵcmp=Va({type:o,selectors:[[`my-remote-interaction`]],decls:2,vars:1,consts:[[1,`root`],[`type`,`danger`]],template:function(e,n){e&1&&(wp(0,`div`,0),EV(1,D,2,1,`my-alert`,1),kb()),e&2&&(FB(),bV(n.error?1:-1))},dependencies:[c],encapsulation:2,changeDetection:1})},providers:[p,A],canActivate:[kg],data:{meta:{title:"Interacción remota"}}}];export{j as default};
//# debugId=e45ffdf0-4893-5dff-bd97-447afa8a6c54
//# sourceMappingURL=chunk-BnZBdrT5.js.map