import{o as e}from"./rolldown-runtime-iuO8RvI4.js";import{Vi as s}from"./shared-0-C4kdVF7Y.js";import{Ei as t,Mi as a,ki as l}from"./vendor-frame-CwiylG4Y.js";import{vr as i}from"./shared-6-Cf_fMhRZ.js";import{R as r,w as n}from"./shared-frame-DbQbH4Yr.js";var c=e(a()),d=l(),o=(0,c.memo)(({content:e,onCtaClick:a,onDismiss:l,ImageComponent:c,CtaCaptionLink:o,classNames:x})=>{const h=c??"img",f=o??m,p=i()(),j=e.ctaCaptionHref&&/^https?:\/\//.test(e.ctaCaptionHref)?e.ctaCaptionHref:void 0,u=p({defaultMessage:"Close",id:"rbrahOGMC3"}),g=p({defaultMessage:"Later",id:"uQDRsYlg+S"}),b=e.imageAlt??e.title,N=(0,d.jsx)(n.Close,{render:(0,d.jsx)(r,{variant:"onContent",iconOnly:!0,icon:"X","aria-label":u,tooltip:!1})});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"absolute inset-0 -z-10 flex",children:[(0,d.jsx)("div",{className:"w-full rounded-card bg-surface-0 md:w-1/2 md:rounded-e-none"}),(0,d.jsx)("div",{className:t("hidden rounded-e-[inherit] md:block md:w-1/2",x?.rightPanel??"bg-surface-2")})]}),(0,d.jsx)("div",{className:t("absolute md:hidden",x?.closeButton??"right-4 top-4"),children:N}),(0,d.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2",children:[(0,d.jsxs)("div",{className:t("flex flex-col justify-between gap-lg",x?.contentPanel??"p-xl md:pe-xl"),children:[(0,d.jsxs)("div",{className:"flex flex-col gap-md",children:[e.badgeText&&(0,d.jsx)(s,{variant:"accent",className:"self-start",children:e.badgeText}),(0,d.jsx)(n.Title,{className:"m-0 font-voice text-[28px] leading-tight",children:e.title}),e.bodyText&&(0,d.jsx)("p",{className:"whitespace-pre-line text-body text-secondary",children:e.bodyText}),e.bulletPoints&&e.bulletPoints.length>0&&(e.numberedSteps?(0,d.jsx)("ol",{role:"list",className:t("text-body text-secondary",x?.bulletList??"flex flex-col gap-sm"),children:e.bulletPoints.map((e,s)=>(0,d.jsxs)("li",{className:"flex items-start gap-sm",children:[(0,d.jsx)("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-surface-2 text-caption-medium text-primary",children:s+1}),(0,d.jsx)("span",{children:e})]},s))}):(0,d.jsx)("ul",{className:t("list-disc pl-5 text-body text-secondary",x?.bulletList??"flex flex-col gap-sm"),children:e.bulletPoints.map((e,s)=>(0,d.jsx)("li",{children:e},s))}))]}),(0,d.jsxs)("div",{className:t("flex flex-col gap-xs",x?.ctaContainer),children:[e.ctaCaption&&(0,d.jsx)("p",{className:"mb-2 text-body text-secondary",children:j?(0,d.jsx)(f,{href:j,className:"underline",children:e.ctaCaption}):e.ctaCaption}),(0,d.jsx)(r,{variant:"primary",onClick:a,children:e.ctaText}),(0,d.jsx)(r,{variant:"secondary",onClick:l,children:e.dismissText??g})]})]}),(0,d.jsxs)("div",{className:t("relative hidden items-center justify-center rounded-e-[inherit] md:flex",x?.rightPanelContainer??"overflow-hidden"),children:[(0,d.jsx)(h,{src:e.imageUrl,alt:b,width:600,height:400,className:"h-full w-full object-cover"}),(0,d.jsx)("div",{className:t("absolute",x?.closeButton??"right-4 top-4"),children:N})]})]})]})});function m({href:e,className:s,children:t}){return(0,d.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:s,children:t})}export{o as t};