import{a as A}from"./chunk-JDZ3SSEQ.js";import{b as a}from"./chunk-3E6NKGPI.js";import{b as z}from"./chunk-N2Y56TZM.js";import"./chunk-LATCUF53.js";import{a as b}from"./chunk-UWYLU3BC.js";import"./chunk-Z5MXFWJM.js";import"./chunk-OCU7U6GK.js";import"./chunk-SCKSV2EO.js";import{a as V}from"./chunk-LUTCXJN2.js";import{a as R}from"./chunk-VOIPSSR6.js";import{Dg as U,Eb as g,Fc as x,Ha as s,Rb as y,Sa as h,Sb as C,Za as u,ba as n,gb as v,ld as I,od as S,pb as l,qb as p,s as f}from"./chunk-ZXQQIUTT.js";import{i as c}from"./chunk-RE7RSUSQ.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-vi\xF0fang vantar \xED URL-vi\xF0f\xF6ngum";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="Tekst ekki a\xF0 n\xE1 sambandi vi\xF0 fjartengt tilfang";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:"Fjartengd gagnvirkni"}}}];export{K as default};/**i18n:4ea3d52b0fe89d1d8e6fff59c182aeadbd7786f17ffe9a1efa1c7ed627997eaf*///# sourceMappingURL=chunk-LE7WS6WY.js.map