Loading
function(e,t,n){"use strict";n.d(t,{W:()=>y,_:()=>S});var l=n(627968),i=n(64700),s=n(284009),r=n.n(s),a=n(364840),o=n(331322),u=n(123292),c=n(38021),d=n(821609),m=n(169797),h=n(166532),p=n(997330),f=n(659746),g=n(975571),E=n(652215),A=n(26279),C=n(788868),x=n(818348),I=n(375708),_=n(7921);function S(e){let{currentStep:t,isRefreshEnabled:n,backStep:i,handleStepChange:s,primaryButtonProps:c,secondaryButton:d,legacySubmitButton:p}=e;return t===h.pn.CONFIRM?null:t===h.pn.REVIEW?(r()(null!=c,"Missing primaryButtonProps for review step"),(0,l.jsx)(m.lo,{onBackClick:null!=i?()=>s(i):void 0,primaryButtonProps:c})):(0,l.jsx)(a.j,{children:(0,l.jsxs)(o.B,{direction:"horizontal",align:"center",justify:null!=i?"space-between":"end",fullWidth:!0,children:[null!=i?(0,l.jsx)(u.Q,{text:I.intl.string(I.t["13/7kX"]),onClick:()=>s(i),variant:"secondary"}):null,(0,l.jsxs)(o.B,{direction:"horizontal",align:"center",justify:"space-between",...n&&t===h.pn.PLAN_SELECT?{gap:8}:{},fullWidth:!1,children:[d,p]})]})})}function y(e){let t,{onClose:n,guild:s,guildBoostQuantity:r,isTransfer:a=!1,withAnimation:o=!0,paymentSourceType:u,didPurchaseOnFractionalPremium:m=!1,fallbackGuildName:h,customCheckoutFlow:S}=e,{theme:y}=(0,c.wR)(),[v,T]=i.useState(p.V1.Scenes.ENTRY),[N,j]=i.useState(!1),b=s?.name??h;return t=a?null==b?I.intl.format(I.t.P52e1r,{}):I.intl.format(I.t["4UnIk9"],{guildName:b}):m?I.intl.format(I.t.gFaKd1,{helpCenterLink:g.A.getArticleURL(E.MVz.FRACTIONAL_PREMIUM_ABOUT)}):null==b?I.intl.format(I.t.SZ5ohR,{guildSubscriptionQuantity:r}):I.intl.format(I.t.GxK3Mv,{guildName:b,guildSubscriptionQuantity:r}),(0,l.jsxs)("div",{className:_.RP,children:[o?(0,l.jsx)(p.V1,{className:_.ud,nextScene:v,onScenePlay:e=>{if(!N)switch(e){case p.V1.Scenes.ENTRY:return T(p.V1.Scenes.IDLE);case p.V1.Scenes.IDLE:return T(p.V1.Scenes.SUCCESS);case p.V1.Scenes.SUCCESS:return j(!0),T(p.V1.Scenes.IDLE)}},pauseWhileUnfocused:!1}):null,(0,l.jsx)(f.Ay,{className:_.E,theme:y,premiumType:C.PremiumTypes.TIER_2,type:x.Nc.has(u??x.he.UNKNOWN)?f.Ay.Types.PREMIUM_PAYMENT_STARTED:f.Ay.Types.GUILD_BOOST_APPLIED}),(0,l.jsx)("div",{className:_.xR,children:t}),S===A.uH.META_QUEST_WEB_REDIRECT_CHECKOUT?(0,l.jsx)("div",{className:_.xR,children:(0,l.jsxs)("p",{children:[I.intl.string(I.t.bIVRSQ)," ",I.intl.string(I.t["0UJqOy"])]})}):(0,l.jsx)(d.$,{variant:"primary",text:S===A.uH.MOBILE_WEB_REDIRECT_CHECKOUT?I.intl.string(I.t.sRApon):I.intl.string(I.t["/iTxgz"]),onClick:n})]})}}