Module 480642

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