import { getColorGradient } from '@/utils/colorParser'; import { ThemeIcon } from './ThemeIcon'; import type { BlockRendererProps } from './types'; export function CardsBlock({ blocks, isMobile, isLight, getLocalizedText, getSvgHtml, renderBlockButtons, }: BlockRendererProps) { const visibleBlocks = blocks.filter( (b) => getLocalizedText(b.title) || getLocalizedText(b.description) || b.buttons?.length, ); if (!visibleBlocks.length) return null; return (
{visibleBlocks.map((block, index) => { const gradientStyle = getColorGradient(block.svgIconColor || 'cyan', isLight); return (

{getLocalizedText(block.title)}

{getLocalizedText(block.description)}

{renderBlockButtons(block.buttons, 'light')}
); })}
); }