import{C}from'./chunk-CDhLx_Ru.js';import{d7 as ck,g,aO as Vr,b2 as mt,aM as N1,dy as K,eZ as E,b as Pa,bW as v,s as sp,k as w2,d as lb,W as WB,o as x2,a6 as XV,S as SV,ak as xx}from'./main-DEZ5cZzu.js';import{j}from'./chunk-CMCtTkWA.js';import'./chunk-DmY7bGyL.js';import'./chunk-CrWoVCei.js';function V(t,_){if(t&1&&(sp(0,"my-alert",1),XV(1),lb()),t&2){let e=SV();WB(),xx(e.error);}}var D=(()=>{class t{route=g(Vr);router=g(mt);search=g(j);error="";ngOnInit(){let e=this.route.snapshot.queryParams.uri;if(!e){this.error="ijo li lon ala nimi linluwi";return;}this.loadUrl(e);}loadUrl(e){N1([this.search.searchVideos({search:e}),this.search.searchVideoChannels({search:e})]).subscribe(([o,r])=>{let a;if(o.data.length!==0){let l=o.data[0];a=K.buildWatchUrl(l);}else if(r.data.length!==0)a="/c/"+new E(r.data[0]).nameWithHost;else{this.error="mi ken ala lukin e ijo ni pi ma ante";return;}this.router.navigateByUrl(a);});}static ɵfac=function(o){return new(o||t)();};static ɵcmp=Pa({type:t,selectors:[["my-remote-interaction"]],decls:2,vars:1,consts:[[1,"root"],["type","danger"]],template:function(o,r){o&1&&(sp(0,"div",0),w2(1,V,2,1,"my-alert",1),lb()),o&2&&(WB(),x2(r.error?1:-1));},dependencies:[v],encapsulation:2,changeDetection:1});}return t;})();var G=[{path:"",component:D,providers:[C,j],canActivate:[ck],data:{meta:{title:"ijo pi ma ante"}}}];/**i18n:c8855ca17fb20171aa9dd43d012e42547cb1f0cfd9c21d4dc05679bbbdf5ccb8*/export{G as default};//# sourceMappingURL=chunk-BnpfB0-A.js.map