import{o as e}from"./rolldown-runtime-iuO8RvI4.js";import{Tu as s}from"./shared-0-C4kdVF7Y.js";import{Mi as r,ki as n}from"./vendor-frame-CwiylG4Y.js";import{gp as t,hp as o}from"./shared-1-3-6x7RKF.js";import{A as a}from"./shared-18-C5QwAjwU.js";import{t as i}from"./c755b7060-BkfUUzd9.js";var m=e(r()),l=n();function c({src:e,alt:s,width:r,height:n,className:t}){return(0,l.jsx)("img",{loading:"lazy",src:e,alt:s,width:r,height:n,className:t})}var h=(0,m.memo)(({content:e,enabled:s,onDismiss:r,onAction:n})=>{const t=e;if(!s)return null;const o=t.ctaHref.startsWith("http")||t.ctaHref.startsWith("https");return(0,l.jsx)(a,{modalSize:"xl",modalClassName:"!p-0 !rounded-2xl",onDismiss:r,onAction:n,render:({handleDismiss:e,handleAction:s})=>(0,l.jsx)(d,{content:t,isExternalLink:o,handleDismiss:e,handleAction:s})})}),d=(0,m.memo)(({content:e,isExternalLink:r,handleDismiss:n,handleAction:o})=>{const a=s();return(0,l.jsx)(i,{content:e,onCtaClick:(0,m.useCallback)(()=>{r?t({href:e.ctaHref,desktopBehavior:"open-in-browser"}):a.push(e.ctaHref),o()},[e.ctaHref,r,o,a]),onDismiss:n,ImageComponent:c,CtaCaptionLink:p})});function p({href:e,className:s,children:r}){return(0,l.jsx)(o,{href:e,webBehavior:"new-tab",desktopBehavior:"open-in-browser",rel:"noopener noreferrer",className:s,children:r})}export{h as SpotlightV1};