import{C}from'./chunk-DgowzBSy.js';import{d7 as ak,g,aO as jr,b2 as mt,aM as R1,dy as K,eZ as E,b as Pa,bW as v,s as sp,m as _2,u as ub,z as zB,A as w2,a6 as KV,o as bV,ak as wx}from'./main-BiUBeaMj.js';import{j}from'./chunk-BkaflMxL.js';import'./chunk-DKL7x6EW.js';import'./chunk-B32E78Jb.js';function V(t,_){if(t&1&&(sp(0,"my-alert",1),KV(1),ub()),t&2){let e=bV();zB(),wx(e.error);}}var D=(()=>{class t{route=g(jr);router=g(mt);search=g(j);error="";ngOnInit(){let e=this.route.snapshot.queryParams.uri;if(!e){this.error="Lipse\u0219te parametrul URL \xEEn parametrii URL";return;}this.loadUrl(e);}loadUrl(e){R1([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="Nu se poate accesa resursa la distan\u021B\u0103";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),_2(1,V,2,1,"my-alert",1),ub()),o&2&&(zB(),w2(r.error?1:-1));},dependencies:[v],encapsulation:2,changeDetection:1});}return t;})();var G=[{path:"",component:D,providers:[C,j],canActivate:[ak],data:{meta:{title:"Interac\u021Biune la distan\u021B\u0103"}}}];/**i18n:fad79908930cbb4c308e7550a5fe49bb3841dbb330066a6429aebaa006173605*/export{G as default};//# sourceMappingURL=chunk-LYN-Av_b.js.map