Loading
function(e,t,n){n.d(t,{Jg:()=>S,lo:()=>I,oH:()=>g,s3:()=>N});var l=n(627968),r=n(64700),u=n(503698),i=n.n(u),a=n(20742),s=n(364840),o=n(331322),d=n(224640),c=n(430993),A=n(500380),E=n(423764),f=n(683433),m=n(981036),h=n(725836),T=n(520149),p=n(857414);function N(e){let{gradientColor:t,title:n,headerBadgeText:u,headerBadgeIcon:i,countryCode:s,relocationCountryCode:o,...d}=e,{checkoutHeaderConfigs:c}=(0,h.ck)(),f=r.useCallback(()=>null==s?null:(0,l.jsx)("img",{alt:"",className:p.bI,src:(0,A.t)(s)}),[s]),m=r.useMemo(()=>{if(null!=u||null!=c.headerBadgeText)return{icon:c.headerBadgeIcon??i,type:{text:c.headerBadgeText??u??""},variant:"expressive"}},[u,i,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:f}},[N,s,f]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.rQ,{...d,badge:m,badgePosition:"end",gradientColor:t,titleTextVariant:"heading-lg/semibold",alignCenter:!1,title:n,subtitle:C}),N&&(0,l.jsx)(T.w,{countryCode:s,relocationCountryCode:o})]})}let C={top:16,bottom:8};function I(e){let{onBackClick:t,primaryButtonProps:n,portalClassName:r}=e,{variant:u}=n,{setCheckoutFooterContentNode:a}=(0,h.ck)();return(0,l.jsxs)(s.j,{children:[(0,l.jsx)("div",{ref:a,className:i()(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)(f.A,{onClick:t}):null,(0,l.jsx)(m.p,{...n,variant:u??"active"})]})]})}function S(e){let{children:t,size:n="md",maxHeight:r="viewport",...u}=e;return(0,l.jsx)(d.d,{size:n,...u,maxHeight:r,children:t})}function g(e){let{title:t,gradientColor:n="purple",countryCode:r,relocationCountryCode:u,headerBadgeText:i,headerBadgeIcon:a,onBackClick:s,primaryButtonProps:o,children:A,...E}=e;return(0,l.jsx)(h.e0,{children:(0,l.jsxs)(d.d,{...E,children:[(0,l.jsx)(N,{gradientColor:n,title:t,countryCode:r,relocationCountryCode:u,headerBadgeText:i,headerBadgeIcon:a}),(0,l.jsx)(c.c,{children:A}),(0,l.jsx)(I,{onBackClick:s,primaryButtonProps:o})]})})}}