import React from 'react'; import clsx from 'clsx'; import { LandingBentoGridItem, BentoGridItem } from './LandingBentoGridItem'; export interface LandingBentoGridSectionProps { title?: string; titleComponent?: React.ReactNode; description?: string; descriptionComponent?: React.ReactNode; items?: BentoGridItem[]; children?: React.ReactNode; className?: string; gridClassName?: string; withBackground?: boolean; withBackgroundGlow?: boolean; backgroundGlowVariant?: 'primary' | 'secondary'; variant?: 'primary' | 'secondary'; textPosition?: 'center' | 'left'; } /** * A flexible bento grid section component for creating visually appealing grid layouts. * Supports both programmatic items array and declarative children components. */ export function LandingBentoGridSection({ title, titleComponent, description, descriptionComponent, items = [], children, className = '', gridClassName = '', withBackground = false, withBackgroundGlow = false, backgroundGlowVariant = 'primary', variant = 'primary', textPosition = 'center', }: LandingBentoGridSectionProps) { const hasChildrenToRender = React.Children.count(children) > 0; return (
{withBackgroundGlow ? (
) : null}
{titleComponent || (title && (

{title}

))} {descriptionComponent || (description && (

{description}

))}
{hasChildrenToRender ? children : items.map((item, index) => ( ))}
); }