(self.webpackChunk=self.webpackChunk||[]).push([[5331],{91743:(e,n,l)=>{"use strict";l.d(n,{Q:()=>a});var t=l(82762);const a=(e=[],n=!1,l=!1)=>{const a=[...e];if(!1===n){const e=a.findIndex((e=>(null==e?void 0:e.targetUri)===t.APP_ROUTES.profileBankAccounts));-1!==e&&a.splice(e,1)}if(!1===l){const e=a.findIndex((e=>(null==e?void 0:e.targetUri)===t.APP_ROUTES.profilePaymentAccounts));-1!==e&&a.splice(e,1)}return a.filter(Boolean)}},55331:(e,n,l)=>{"use strict";l.r(n),l.d(n,{UserMenu:()=>Z,default:()=>I});var t=l(12139),a=l(56747),i=l(58059),r=l(82762),o=l(35104),s=l(58061),c=l(85573),u=l(16575),d=l(85782),m=l(46062),h=l.n(m),p=l(44036),b=l.n(p),g=l(96793),_=l.n(g),v=l(17892),f=l.n(v),y=l(11173),w=l.n(y),x=l(42464),A=l.n(x),S=l(58183),U=l.n(S),E={};E.styleTagTransform=A(),E.setAttributes=f(),E.insert=_().bind(null,"head"),E.domAPI=b(),E.insertStyleElement=w(),h()(U(),E),U()&&U().locals&&U().locals;var T=l(56753);function P({label:e,value:n,onClick:l}){const t=(0,d.O5)("money-details",{clickable:l});return(0,T.BX)("div",{className:t,onClick:l,children:[(0,T.tZ)(u.le,{className:"money-details__icon",name:"info"}),(0,T.tZ)("span",{className:"money-details__label",children:e}),(0,T.tZ)("span",{className:"money-details__value",children:n})]})}var B=l(91743),N=l(34844),k=l(24691),O=l(39704),R=l.n(O),C={};C.styleTagTransform=A(),C.setAttributes=f(),C.insert=_().bind(null,"head"),C.domAPI=b(),C.insertStyleElement=w(),h()(R(),C),R()&&R().locals&&R().locals;const W="user-menu",M=(0,d.dG)(W);function Z(){var e,n,l,m,h,p,b,g,_,v,f,y,w,x,A,S,U,E,O,R,C,Z,I;const{user:L,resetUser:X,refreshBalance:F}=(0,s.aF)(),{untilUnmount:H}=(0,s.kw)(),{setError:j}=(0,s.fH)(),G=(0,s.qM)(),D=(0,a.k6)(),Y=(0,s.Qo)(),{userMenu:z}=(0,s.H9)(!1),{isThrottled:J,throttleAction:K}=(0,s.d2)(),Q=(0,t.sO)(null),[$,q]=(0,t.eJ)({casino:!1,freeBets:!1,sport:!1,freeSpins:!1}),[V,ee]=(0,t.eJ)(null),[ne,le]=(0,t.eJ)(null);(0,t.d4)((()=>{L&&F({error:j})}),[null==L||null==(e=L.account)?void 0:e.id]),(0,t.d4)((()=>{if(z){const e=V?(0,B.Q)(z,V.enableWithdrawalWithBankAccount,V.enableWithdrawalWithPaymentMethod):z;le(e),q({casino:(0,d.m)(e,r.APP_ROUTES.profileCasinoBonuses),freeBets:(0,d.m)(z,r.APP_ROUTES.profileFreebets),sport:(0,d.m)(e,r.APP_ROUTES.profileSportsBonuses),freeSpins:(0,d.m)(e,r.APP_ROUTES.profileFreeSpins)})}}),[V,z]),(0,t.d4)((()=>{const e=c.ag.subscribe((e=>{var n;Q.current=null==(n=e[0])?void 0:n.pathname})),n=c.PK.getKey(r.FeatureToggleKeys.PaymentAndWithdraw).subscribe({next:e=>{ee((0,k.e)(null==e?void 0:e.configs))},error:()=>{ee((0,k.e)(null))}});return()=>{e.unsubscribe(),n.unsubscribe()}}),[]);const te=()=>{o.NZ.showDepositAmount&&ae(),Y.open()},ae=()=>{c.rc.toggle(null)},ie=()=>{c.PT.open(r.ModalType.ResponsibleGaming,{navigateToUrlOnClose:D.location.pathname,historyRouteOnOpen:r.APP_ROUTES.responsibleGaming}),ae()},re=()=>{c.rc.freeBetsClick$.next()};return L&&Object.keys(L).length?(0,T.tZ)("div",{className:W,children:(0,T.BX)(u.Od,{visible:null===ne,type:r.SkeletonType.UserMenu,forceCover:!0,children:[(0,T.BX)("div",{className:M("header"),children:[(0,T.tZ)(u.Oc,{withLink:!1}),(0,T.tZ)("div",{className:M("close-icon-wrap"),onClick:ae,children:(0,T.tZ)(u.le,{className:M("close-icon"),name:"close"})})]}),(0,T.BX)("div",{className:M("info"),children:[(0,T.BX)("div",{className:M("profile-details"),children:[(0,T.BX)("div",{className:M("mobile-id"),children:[(0,T.BX)("span",{className:M("username"),children:[null==L||null==(n=L.account)?void 0:n.firstName," ",null==L||null==(l=L.account)?void 0:l.lastName]}),(0,T.BX)("span",{className:M("account-id"),children:["ID-",null==L||null==(m=L.account)?void 0:m.id]})]}),(null==L||null==(h=L.balance)?void 0:h.rating)&&$.casino&&(0,T.tZ)("div",{className:M("rating"),children:(0,T.tZ)("span",{className:M("level"),children:null==L||null==(p=L.balance)?void 0:p.rating})}),(null==L||null==(b=L.balance)?void 0:b.rating)&&!$.casino&&(0,T.tZ)(N.H,{rating:Number(null==L||null==(g=L.balance)?void 0:g.rating)})]}),(0,T.BX)("div",{className:M("money"),children:[(0,T.BX)("div",{className:M("money-details"),children:[$.casino&&(0,T.BX)(T.HY,{children:[(0,T.tZ)(P,{value:(0,d.wU)(null==L||null==(_=L.balance)?void 0:_.total,null==L||null==(v=L.balance)?void 0:v.currency),label:G("USER.TOTAL_BALANCE")}),(0,T.tZ)(P,{value:(0,d.wU)(null==L||null==(f=L.balance)?void 0:f.restricted,null==L||null==(y=L.balance)?void 0:y.currency),label:G("USER.RESTRICTED_BALANCE")})]}),(0,T.tZ)(P,{value:(0,d.wU)(null==L||null==(w=L.balance)?void 0:w.withdrawable,null==L||null==(x=L.balance)?void 0:x.currency),label:G($.casino?"USER.WITHDRAWAL_CASH_BALANCE":"USER.CASH_BALANCE")}),$.sport&&(0,T.tZ)(P,{value:(0,d.wU)(null==L||null==(A=L.balance)?void 0:A.sportBonus,null==L||null==(S=L.balance)?void 0:S.currency),label:G($.casino?"USER.SPORT_BONUS":"USER.BONUS_BALANCE"),onClick:()=>{c.rc.toggle(r.MenuType.USER_MENU),D.push(r.APP_ROUTES.profileSportsBonuses)}}),$.casino&&(0,T.tZ)(P,{value:(0,d.wU)(null==L||null==(U=L.balance)?void 0:U.casinoBonus,null==L||null==(E=L.balance)?void 0:E.currency),label:G("USER.CASINO_BONUS"),onClick:()=>{c.rc.toggle(r.MenuType.USER_MENU),D.push(r.APP_ROUTES.profileCasinoBonuses)}}),$.freeBets&&(0,T.tZ)(P,{value:(null==L||null==(O=L.balance)?void 0:O.numberOfFreeBets)||0,label:G("_FREE_BETS"),onClick:()=>{c.rc.toggle(r.MenuType.USER_MENU),D.push(r.APP_ROUTES.profileFreebets),re()}}),$.freeSpins&&(0,T.tZ)(P,{value:(null==L||null==(R=L.balance)?void 0:R.numberOfFreeSpins)||0,label:G("_FREE_SPINS"),onClick:()=>{c.rc.toggle(r.MenuType.USER_MENU),D.push(r.APP_ROUTES.profileFreeSpins)}}),!$.casino&&(null==L||null==(C=L.balance)?void 0:C.restricted)>0&&(0,T.tZ)(P,{value:(0,d.wU)(null==L||null==(Z=L.balance)?void 0:Z.restricted,null==L||null==(I=L.balance)?void 0:I.currency),label:G("USER.PENDING_BONUS_CASH")})]}),(0,T.BX)("div",{className:M("buttons-container"),children:[(0,T.tZ)(u.l0.Button,{type:"button",disabled:J,onClick:()=>K(te),children:G("BUTTON.DEPOSIT")}),(0,T.tZ)(u.l0.Button,{className:"withdrawals-button",type:"button",color:"secondary",onClick:()=>{c.rc.toggle(r.MenuType.USER_MENU),c.PT.open(r.ModalType.Withdraw,{navigateToUrlOnClose:Q.current,historyRouteOnOpen:r.APP_ROUTES.withdrawal})},children:G("USER.WITHDRAW")})]})]})]}),(0,T.BX)("div",{className:M("actions"),children:[(()=>{let e;return ne?ne.map(((n,l)=>{switch(n.targetUri){case r.APP_ROUTES.profileFreebets:e={onClick:re};break;case r.APP_ROUTES.profileAccountLimits:case r.APP_ROUTES.profileRewardsHub:e={hideArrowIcon:!1};break;case r.APP_ROUTES.responsibleGaming:e={onClick:ie,hideArrowIcon:!0,targetUri:void 0};break;default:e={}}return(0,T.tZ)(u.LY,Object.assign({name:n.title,targetUri:n.targetUri,hideMediaIcon:!0},e),`${n.targetUri}-${l}`)})):null})(),(0,T.tZ)(u.LY,{name:G("CHANGE_PASS.TITLE"),onClick:()=>{ae(),c.PT.open(r.ModalType.ChangePassword)},hideMediaIcon:!0,hideArrowIcon:!0}),(0,T.tZ)(u.LY,{name:G("USER.LOG_OUT"),onClick:()=>{i.BG.logout().pipe(H()).subscribe((()=>{X(),c.rc.toggle(r.MenuType.USER_MENU)}))},hideMediaIcon:!0,hideArrowIcon:!0})]})]})}):null}const I=Z},34844:(e,n,l)=>{"use strict";l.d(n,{H:()=>x});var t=l(12139),a=l(16575),i=l(85782),r=l(46062),o=l.n(r),s=l(44036),c=l.n(s),u=l(96793),d=l.n(u),m=l(17892),h=l.n(m),p=l(11173),b=l.n(p),g=l(42464),_=l.n(g),v=l(81340),f=l.n(v),y={};y.styleTagTransform=_(),y.setAttributes=h(),y.insert=d().bind(null,"head"),y.domAPI=c(),y.insertStyleElement=b(),o()(f(),y),f()&&f().locals&&f().locals;var w=l(56753);function x({rating:e=0}){const n="user-rating",l=(0,i.dG)(n),r=(0,t.Ye)((()=>{const n=[];for(let t=0;t<5;t++)n.push((0,w.tZ)(a.le,{name:"rating",className:(0,i.O5)(l("star"),{active:e>t,inactive:e<=t})}));return n}),[e]);return(0,w.tZ)("div",{className:n,children:r})}},24691:(e,n,l)=>{"use strict";l.d(n,{e:()=>r});var t=l(64763),a=l(35104);const i=["enableWithdrawalWithPaymentMethod","enableWithdrawalWithBankAccount","enableAddWithdrawalPaymentMethod","enableAddWithdrawalBankAccount","showWithholdingTaxStep"];function r(e){const n=Object.assign({},a.NZ.payment);return function(e){if(!e)return!1;const n=Object.keys(e).length===i.length,l=Object.keys(e).every((e=>i.includes(e))),a=Object.values(e).every((e=>e.type===t.FeatureConfigurationsDataType.Boolean));return n&&l&&a}(e)?{enableWithdrawalWithPaymentMethod:e.enableWithdrawalWithPaymentMethod.value,enableWithdrawalWithBankAccount:e.enableWithdrawalWithBankAccount.value,enableAddWithdrawalPaymentMethod:e.enableAddWithdrawalPaymentMethod.value,enableAddWithdrawalBankAccount:e.enableAddWithdrawalBankAccount.value,showWithholdingTaxStep:e.showWithholdingTaxStep.value}:n}},58183:e=>{e.exports=[[e.id,".money-details{display:flex;align-items:center}.money-details__icon{height:16px;width:16px;fill:var(--color-brand-text);margin-right:4px}.money-details__label{font-weight:400}.money-details__value{font-weight:700;margin-left:auto}.money-details--clickable{color:var(--color-clickable-hightlight);cursor:pointer}","",""]]},39704:e=>{e.exports=[[e.id,'.user-menu{position:relative;display:flex;flex-direction:column;font-family:"Roboto Condensed",sans-serif;background-color:var(--color-primary-background);min-height:100vh;min-width:375px}@media only screen and (max-width: 360px){.user-menu{min-width:100%}}.user-menu__header{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;background-color:var(--color-brand-background)}.user-menu__header .brand-logo{flex-grow:0}.user-menu__header .brand-logo__image--guinee-games{max-height:42px;max-width:65px}.user-menu__header .brand-logo__image--guinee-vegas{max-height:36px;max-width:80px}.user-menu__header .brand-logo__image--mercury-vegas{max-height:44px}.user-menu__close-icon-wrap{display:flex;align-items:center;justify-content:center;height:40px;width:40px;cursor:pointer}.user-menu__close-icon{fill:var(--color-brand-text);height:100%;width:100%}.user-menu__info{display:flex;flex-direction:column;align-items:center;background-color:var(--color-brand-background);padding:16px 18px 40px;color:var(--color-brand-text)}.user-menu__profile-details{display:flex;flex-direction:column;align-items:center;width:100%}.user-menu__username{font-size:20px;font-weight:700;line-height:28px}.user-menu__account-id{font-size:16px;font-weight:400;line-height:16px;margin:2px 0;color:var(--color-white-64)}.user-menu__mobile-id,.user-menu__rating{display:flex;flex-direction:column;align-items:center}.user-menu__rating{font-size:14px;line-height:16px;font-weight:700;align-items:center;margin-top:8px}.user-menu__money{display:flex;flex-direction:column;margin-top:16px;max-width:268px;width:100%}.user-menu__money-details{font-size:14px;font-weight:400;line-height:20px}.user-menu__money-details .money-details{margin-bottom:8px}.user-menu__money-details .money-details:last-child{margin-bottom:0}.user-menu__buttons-container{display:flex;align-items:center;justify-content:space-between;margin-top:16px}.user-menu__buttons-container .form-button{max-width:130px}.user-menu__buttons-container .form-button.withdrawals-button{margin-left:8px;background-color:transparent;border:2px solid var(--color-user-menu-withdraw-button-border);color:var(--color-user-menu-withdraw-button-text)}.user-menu__buttons-container .form-button.withdrawals-button:not(:disabled):hover{border-color:var(--color-user-menu-withdraw-button-hover-border);color:var(--color-user-menu-withdraw-button-hover-text)}.user-menu__buttons-container .form-button--disabled{opacity:.8;filter:grayscale(0.5)}.user-menu__actions{padding:16px 0}.user-menu__actions .nav-item{padding:0 16px}',"",""]]},81340:e=>{e.exports=[[e.id,".user-rating{display:flex;align-items:center;line-height:12px;margin:4px 0 8px}.user-rating__star{margin-right:2px;width:10px;height:10px}.user-rating__star--inactive *{fill:var(--color-neutral-220)}.user-rating__star--active *{fill:var(--color-yellow)}","",""]]}}]);