import{o as e}from"./rolldown-runtime-iuO8RvI4.js";import{Mi as a,ki as s}from"./vendor-frame-CwiylG4Y.js";import{vr as i}from"./shared-6-Cf_fMhRZ.js";import{R as t}from"./shared-frame-DbQbH4Yr.js";import{i as r,n as l,o,r as m,t as c}from"./cdbbb92f5-Bsc56kX2.js";var d=e(a()),n=s(),x=(e,a,s,i)=>"number"==typeof e&&Number.isFinite(e)?Math.min(Math.max(e,a),s):i,f=(0,d.memo)(({content:e,onCtaClick:a,onDismiss:s,ImageComponent:d})=>{const f=d??h,p=i()()({defaultMessage:"Dismiss",id:"TDaF6JVgG6"}),u=o(e.pictogramName),v=!1===e.pictogramAnimated?void 0:r(e.pictogramName),j=void 0!==u||void 0!==e.imageUrl,g=l(void 0!==u?e.pictogramBackground:void 0),b=m(e.pictogramSize,"sm"),N=void 0!==u?Math.max(99,b+32):99,y=x(e.imageHeight,40,480,N);return(0,n.jsxs)("div",{className:"relative rounded-card shadow-panel-lg",style:{width:x(e.cardWidth,176,480,190),maxWidth:"calc(100vw - 5rem)"},children:[(0,n.jsxs)("div",{className:"w-full overflow-hidden rounded-card bg-surface-3 shadow-card-ring",children:[j&&(0,n.jsx)("div",{className:"p-2",children:(0,n.jsx)("div",{className:`relative overflow-hidden rounded ${g}`,style:{height:y-16},children:void 0!==u?(0,n.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,n.jsx)(c,{animated:v,name:u,size:b})}):void 0!==e.imageUrl?(0,n.jsx)(f,{src:e.imageUrl,alt:"",fill:!0,className:"contain"===e.imageFit?"object-contain object-center":"object-cover object-center",priority:!0}):null})}),(0,n.jsxs)("div",{className:"flex flex-col gap-md px-md pb-md pt-sm",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-sm text-left",children:[(0,n.jsx)("p",{className:"text-body font-medium text-primary",children:e.title}),(0,n.jsx)("p",{className:"text-caption text-muted",children:e.body})]}),(0,n.jsx)(t,{variant:"primary",onClick:a,children:e.buttonText})]})]}),(0,n.jsx)("div",{className:"absolute -right-2 -top-2 z-20",children:(0,n.jsx)(t,{variant:"secondary",iconOnly:!0,icon:"X",size:"xs","aria-label":p,onClick:s,className:"rounded-full bg-surface-2"})})]})});function h({src:e,alt:a,className:s}){return(0,n.jsx)("img",{src:e,alt:a,className:`absolute inset-0 h-full w-full ${s??""}`})}export{f as t};