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