import{a as A}from"./chunk-ONXESYFZ.js";import{b as c}from"./chunk-AKYES5GO.js";import{b as z}from"./chunk-RZ76RA6V.js";import"./chunk-K6LRUFYU.js";import{a as j}from"./chunk-S3EOECWM.js";import"./chunk-IC23Q2I7.js";import"./chunk-DZZLGFRO.js";import"./chunk-VRWNGTON.js";import{a as b}from"./chunk-7ST2GVW3.js";import{a as V}from"./chunk-5QNRJ25A.js";import{Cb as y,Da as s,Db as I,Ea as a,Lb as C,Oa as u,Wa as v,ad as x,ba as h,db as l,dd as U,eb as p,r as f,sb as g,uc as S,vg as R}from"./chunk-QXV2GR6R.js";import{i}from"./chunk-JJ4RDTEF.js";function _(o,r){if(o&1&&(l(0,"my-alert",2),y(1),p()),o&2){let L=g();s(),I(L.error);}}var F=(()=>{let r=class r{constructor(e,t,n){i(this,"route");i(this,"router");i(this,"search");i(this,"error","");this.route=e,this.router=t,this.search=n;}ngOnInit(){let e=this.route.snapshot.queryParams.uri;if(!e){this.error="A\u0263ewwar n URL ixu\u1E63\u1E63 deg yi\u0263ewwaren n URL";return;}this.loadUrl(e);}loadUrl(e){f([this.search.searchVideos({search:e}),this.search.searchVideoChannels({search:e})]).subscribe(([t,n])=>{let m;if(t.data.length!==0){let d=t.data[0];m=b.buildWatchUrl(d);}else if(n.data.length!==0)m="/c/"+new V(n.data[0]).nameWithHost;else{this.error="Anekcum \u0263er u\u0263balu anmeggag d awez\u0263i";return;}this.router.navigateByUrl(m);});}};i(r,"\u0275fac",function(t){return new(t||r)(a(x),a(U),a(c));}),i(r,"\u0275cmp",h({type:r,selectors:[["my-remote-interaction"]],standalone:!0,features:[C],decls:2,vars:1,consts:[[1,"root"],["type","danger",4,"ngIf"],["type","danger"]],template:function(t,n){t&1&&(l(0,"div",0),u(1,_,2,1,"my-alert",1),p()),t&2&&(s(),v("ngIf",n.error));},dependencies:[S,j],encapsulation:2}));let o=r;return o;})();var O=[{path:"",component:F,providers:[A,c,z],canActivate:[R],data:{meta:{title:"Amyigew anmeggag"}}}];export{O as default};/**i18n:224bcada6943fe8b17ea60808c2d370cec9507c3bd670ebe71692d099a3befa1*///# sourceMappingURL=chunk-PUUNX6UU.js.map