Module 169797

2,062 characters · in 4843fcbab4cc4962.js, ba41210350c59588.js
Dependencies
Source Raw
function(e,t,n){n.d(t,{Jg:()=>S,lo:()=>I,oH:()=>_,s3:()=>N});var l=n(627968),r=n(64700),i=n(503698),a=n.n(i),u=n(20742),s=n(364840),o=n(331322),d=n(224640),c=n(430993),A=n(500380),E=n(423764),m=n(683433),h=n(981036),T=n(725836),f=n(520149),p=n(857414);function N(e){let{gradientColor:t,title:n,headerBadgeText:i,headerBadgeIcon:a,countryCode:s,relocationCountryCode:o,...d}=e,{checkoutHeaderConfigs:c}=(0,T.ck)(),m=r.useCallback(()=>null==s?null:(0,l.jsx)("img",{alt:"",className:p.bI,src:(0,A.t)(s)}),[s]),h=r.useMemo(()=>{if(null!=i||null!=c.headerBadgeText)return{icon:c.headerBadgeIcon??a,type:{text:c.headerBadgeText??i??""},variant:"expressive"}},[i,a,c.headerBadgeText,c.headerBadgeIcon]),N=null!=s&&null!=o,C=r.useMemo(()=>{if(!N&&null!=s)return{text:(0,E.j7)((0,E.ni)(s)),leadingIcon:m}},[N,s,m]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(u.rQ,{...d,badge:h,badgePosition:"end",gradientColor:t,titleTextVariant:"heading-lg/semibold",alignCenter:!1,title:n,subtitle:C}),N&&(0,l.jsx)(f.w,{countryCode:s,relocationCountryCode:o})]})}let C={top:16,bottom:8};function I(e){let{onBackClick:t,primaryButtonProps:n,portalClassName:r}=e,{variant:i}=n,{setCheckoutFooterContentNode:u}=(0,T.ck)();return(0,l.jsxs)(s.j,{children:[(0,l.jsx)("div",{ref:u,className:a()(p.K4,r)}),(0,l.jsxs)(o.B,{direction:"horizontal",align:"center",justify:null!=t?"space-between":"end",fullWidth:!0,padding:C,children:[null!=t?(0,l.jsx)(m.A,{onClick:t}):null,(0,l.jsx)(h.p,{...n,variant:i??"active"})]})]})}function S(e){let{children:t,size:n="md",maxHeight:r="viewport",...i}=e;return(0,l.jsx)(d.d,{size:n,...i,maxHeight:r,children:t})}function _(e){let{title:t,gradientColor:n="purple",countryCode:r,relocationCountryCode:i,headerBadgeText:a,headerBadgeIcon:u,onBackClick:s,primaryButtonProps:o,children:A,...E}=e;return(0,l.jsx)(T.e0,{children:(0,l.jsxs)(d.d,{...E,children:[(0,l.jsx)(N,{gradientColor:n,title:t,countryCode:r,relocationCountryCode:i,headerBadgeText:a,headerBadgeIcon:u}),(0,l.jsx)(c.c,{children:A}),(0,l.jsx)(I,{onBackClick:s,primaryButtonProps:o})]})})}}