import{r as t,j as s}from"./vendor--leCAzSo.js";import{S as e}from"./c755b7060-CMwOftre.js";import{a as n,e as i,I as o}from"./ca9c256b9-7brFE8T2.js";import{S as a}from"./index-DZuQva-j.js";import"./c723dd3dd-58n3MxoB.js";import"./c57c2877c-dpgWZiV5.js";import"./cb5cdda9a-CSfiLIa6.js";import"./c51e217b4-KUwQQl_W.js";import"./tree-sitter-BFuuT2ac.js";function r({src:t,alt:e,width:n,height:i,className:a}){return s.jsx(o,{src:t,alt:e,width:n,height:i,unoptimized:!0,className:a})}const c=t.memo(({content:t,enabled:e,onDismiss:n,onAction:i})=>{const o=t;if(!e)return null;const r=o.ctaHref.startsWith("http")||o.ctaHref.startsWith("https");return s.jsx(a,{modalSize:"xl",modalClassName:"!p-0 !rounded-2xl",onDismiss:n,onAction:i,render:({handleDismiss:t,handleAction:e})=>s.jsx(m,{content:o,isExternalLink:r,handleDismiss:t,handleAction:e})})});c.displayName="SpotlightV1";const m=t.memo(({content:o,isExternalLink:a,handleDismiss:c,handleAction:m})=>{const d=n(),l=t.useCallback(()=>{a?i({href:o.ctaHref,desktopBehavior:"open-in-browser"}):d.push(o.ctaHref),m()},[o.ctaHref,a,m,d]);return s.jsx(e,{content:o,onCtaClick:l,onDismiss:c,ImageComponent:r})});m.displayName="SpotlightV1Inner";export{c as SpotlightV1};
