Build 562131stable
Module 480642
2,726 characters · in e44cfa5558ba63be.jsDependencies
Source Raw
function(e,t,n){n.d(t,{oH:()=>A,s3:()=>k,lo:()=>B,Jg:()=>N});var l=n(627968),r=n(64700),a=n(503698),s=n.n(a),i=n(20742),c=n(364840),d=n(331322),o=n(224640),u=n(430993),x=n(632088),j=n(500380),h=n(423764),m=n(683433),g=n(981036),v=n(725836),p=n(834730),C=n(857414);function b(e){let{countryCode:t,relocationCountryCode:n}=e;return(0,l.jsxs)("div",{className:C.uL,children:[(0,l.jsx)("img",{alt:"",className:C.bI,src:(0,j.t)(t)}),(0,l.jsx)(p.E,{variant:"text-md/normal",color:"text-subtle",children:(0,h.j7)((0,h.ni)(t))}),(0,l.jsx)(p.E,{variant:"text-md/normal",color:"text-subtle",className:C.B5,children:"\u2192"}),(0,l.jsx)("img",{alt:"",className:C.bI,src:(0,j.t)(n)}),(0,l.jsx)(p.E,{variant:"text-md/normal",color:"text-subtle",children:(0,h.j7)((0,h.ni)(n))})]})}function k(e){let{gradientColor:t,title:n,headerBadgeVariant:a="expressive",headerBadgeText:s,headerBadgeIcon:c,countryCode:d,relocationCountryCode:o,...u}=e,{checkoutHeaderConfigs:x}=(0,v.ck)(),m=r.useCallback(()=>null==d?null:(0,l.jsx)("img",{alt:"",className:C.bI,src:(0,j.t)(d)}),[d]),g=r.useMemo(()=>{if(null!=s||null!=x.headerBadgeText)return{icon:x.headerBadgeIcon??c,type:{text:x.headerBadgeText??s??""},variant:x.headerBadgeVariant??a}},[s,c,x.headerBadgeText,x.headerBadgeIcon,a,x.headerBadgeVariant]),p=null!=d&&null!=o,k=r.useMemo(()=>{if(!p&&null!=d)return{text:(0,h.j7)((0,h.ni)(d)),leadingIcon:m}},[p,d,m]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.rQ,{...u,badge:g,badgePosition:"end",gradientColor:t,titleTextVariant:"heading-lg/semibold",alignCenter:!1,title:n,subtitle:k}),p&&(0,l.jsx)(b,{countryCode:d,relocationCountryCode:o})]})}let f={top:16,bottom:8};function B(e){let{onBackClick:t,primaryButtonProps:n,portalClassName:r}=e,{variant:a}=n,{setCheckoutFooterContentNode:i}=(0,v.ck)();return(0,l.jsxs)(c.j,{children:[(0,l.jsx)("div",{ref:i,className:s()(C.K4,r)}),(0,l.jsxs)(d.B,{direction:"horizontal",align:"center",justify:null!=t?"space-between":"end",fullWidth:!0,padding:f,children:[null!=t?(0,l.jsx)(m.A,{onClick:t}):null,(0,l.jsx)(g.p,{...n,variant:a??"active",autoFocus:!0})]})]})}function N(e){let{children:t,size:n="md",maxHeight:r="viewport",...a}=e;return(0,l.jsx)(v.e0,{children:(0,l.jsx)(o.d,{size:n,...a,maxHeight:r,contentOutsideContainer:(0,l.jsx)(x.A,{}),children:t})})}function A(e){let{title:t,gradientColor:n="purple",countryCode:r,relocationCountryCode:a,headerBadgeText:s,headerBadgeIcon:i,onBackClick:c,primaryButtonProps:d,children:x,...j}=e;return(0,l.jsx)(v.e0,{children:(0,l.jsxs)(o.d,{...j,children:[(0,l.jsx)(k,{gradientColor:n,title:t,countryCode:r,relocationCountryCode:a,headerBadgeText:s,headerBadgeIcon:i}),(0,l.jsx)(u.c,{children:x}),(0,l.jsx)(B,{onBackClick:c,primaryButtonProps:d})]})})}}