import{b as R}from"./chunk-3QHNBXF7.js";import{a as E}from"./chunk-3UAMWNPB.js";import{c as B}from"./chunk-TFQ3RBKD.js";import{d as N}from"./chunk-ZSVIZXE3.js";import{$ as T}from"./chunk-MXUIPT66.js";import{Ab as u,Bb as A,Cb as v,Db as C,E as I,Lb as _,Pa as F,Ua as p,Va as m,Xb as b,Xc as $,Yb as f,bd as L,gf as D,ib as s,ob as c,rc as d,s as S,sb as k,sc as h,t as x,ta as y,wc as U,zb as l}from"./chunk-N6B2OJOY.js";function j(e,t){if(e&1&&(v(0),l(1,"a",6),d(2,"async"),f(3,"Zum F\xD6RCH EM-Tippspiel 2024"),u(),C()),e&2){let g=_(2);p(),c("href",h(2,2,g.participationUrl$),F)("foerchExternalLinkOpener",!0)}}function H(e,t){e&1&&(f(0," Sie m\xFCssen im Online-Shop angemeldet sein, um am F\xD6RCH EM-Tippspiel 2024 teilnehmen zu k\xF6nnen."),A(1,"br"),l(2,"cx-generic-link",7),f(3,"Zum Login-Formular "),u()),e&2&&(p(2),k("btn btn-primary mt-2"),c("url","/login"))}function K(e,t){if(e&1&&(v(0),l(1,"div",2)(2,"div",3)(3,"div",4),s(4,j,4,4,"ng-container",5),d(5,"async"),u()()(),s(6,H,4,3,"ng-template",null,0,U),C()),e&2){let g=b(7),i=_();p(4),c("ngIf",h(5,2,i.isLoggedIn$))("ngIfElse",g)}}var ee=(()=>{let t=class t{constructor(i,n,r){this.baseSiteService=i,this.authService=n,this.userAccountService=r,this.canShowComponent$=this.baseSiteService.getActive().pipe(S(a=>[E.AUSTRIA,E.GERMANY].includes(a))),this.isLoggedIn$=this.authService.isUserLoggedIn(),this.participationUrl$=x([this.baseSiteService.getActive(),this.userAccountService.get()]).pipe(I(([a,o])=>!!o),S(([a,o])=>{let M=this.encode(o.firstName),O=this.encode(o.lastName),w=this.encode(o.uid);return`https://${a}.cupkick.de/sso?fn=${M}&ln=${O}&em=${w}`}))}encode(i){return btoa(encodeURIComponent(i).replace(/%([0-9A-F]{2})/g,function(n,r){return String.fromCharCode(+`0x${r}`)}))}};t.\u0275fac=function(n){return new(n||t)(m(N),m(D),m(B))},t.\u0275cmp=y({type:t,selectors:[["foerch-euro-cup-kick"]],decls:2,vars:3,consts:[["anonymousUser",""],[4,"ngIf"],[1,"container"],[1,"row"],[1,"col-12","mt-2","mb-2"],[4,"ngIf","ngIfElse"],["target","_blank",1,"btn","btn-primary",3,"href","foerchExternalLinkOpener"],[3,"url"]],template:function(n,r){n&1&&(s(0,K,8,4,"ng-container",1),d(1,"async")),n&2&&c("ngIf",h(1,1,r.canShowComponent$))},dependencies:[$,T,R,L],encapsulation:2,changeDetection:0});let e=t;return e})();export{ee as a};