"use client"; import React, { memo } from "react"; import TextBox from "@/components/Textbox"; import { cls, shouldUseInvertedText } from "@/lib/utils"; import { useTheme } from "@/providers/themeProvider/ThemeProvider"; import type { LucideIcon } from "lucide-react"; import type { ButtonConfig } from "@/components/cardStack/types"; import type { InvertedBackground } from "@/providers/themeProvider/config/constants"; interface FeatureCard { id: string; title: string; description: string; label: string; } interface SplitAboutCardsProps { title: string; description: string; tag?: string; tagIcon?: LucideIcon; features: FeatureCard[]; buttons?: ButtonConfig[]; useInvertedBackground: InvertedBackground; ariaLabel?: string; className?: string; containerClassName?: string; textBoxClassName?: string; titleClassName?: string; descriptionClassName?: string; tagClassName?: string; buttonContainerClassName?: string; buttonClassName?: string; buttonTextClassName?: string; featuresContainerClassName?: string; featureCardClassName?: string; featureTitleClassName?: string; featureDescriptionClassName?: string; featureLabelClassName?: string; } const SplitAboutCards = ({ title, description, tag, tagIcon, features, buttons, useInvertedBackground, ariaLabel = "About section", className = "", containerClassName = "", textBoxClassName = "", titleClassName = "", descriptionClassName = "", tagClassName = "", buttonContainerClassName = "", buttonClassName = "", buttonTextClassName = "", featuresContainerClassName = "", featureCardClassName = "", featureTitleClassName = "", featureDescriptionClassName = "", featureLabelClassName = "", }: SplitAboutCardsProps) => { const theme = useTheme(); const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle); const isOddCount = features.length % 2 !== 0; return (
{features.map((feature, index) => { const isLastItemOdd = isOddCount && index === features.length - 1; return (

{feature.title}

{feature.description}

{feature.label}

); })}
); }; SplitAboutCards.displayName = "SplitAboutCards"; export default memo(SplitAboutCards);