import{Fn as MV,Gn as NV,Io as kg,Ja as g,Pa as eo,X as D$,Zi as aA,ht as Et,k as Bb,n as $B,nn as J$,qi as _F,s as $a,yc as wp}from"./chunk-b0nJCs5_.js";import{r as g$1,t as K}from"./chunk-BXrVgciI.js";import"./chunk-CswnO8Ym.js";import{t as c}from"./chunk-DNBjyHdz2.js";import"./chunk-uNqEPBRE2.js";import"./chunk-BMaHP5rD2.js";import"./chunk-D3sqbh442.js";import{t as A}from"./chunk-2WQXD8yV2.js";import{t as p}from"./chunk-WJVwu_bH2.js";function D(o,t){if(o&1&&(wp(0,`my-alert`,1),J$(1),Bb()),o&2){let e=D$();$B(),aA(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="Bağlantı adresi parametrelerinde bağlantı adresi parametresi eksik";return}this.loadUrl(t)}loadUrl(t){_F([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="Uzak kaynağa erişilemiyor";return}this.router.navigateByUrl(m)})}static ɵfac=function(e){return new(e||o)};static ɵcmp=$a({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),NV(1,D,2,1,`my-alert`,1),Bb()),e&2&&($B(),MV(n.error?1:-1))},dependencies:[c],encapsulation:2,changeDetection:1})},providers:[p,A],canActivate:[kg],data:{meta:{title:"Uzaktan etkileşim"}}}];export{j as default};
//# debugId=98b6ea30-6040-5244-acc3-ff6d25ad2417
//# sourceMappingURL=chunk-DRDfdbdV2.js.map