"use client"; import { memo, Fragment } from "react"; import CardStackTextBox from "@/components/cardStack/CardStackTextBox"; import MediaContent from "@/components/shared/MediaContent"; import { cls, shouldUseInvertedText } from "@/lib/utils"; import { useTheme } from "@/providers/themeProvider/ThemeProvider"; import type { LucideIcon } from "lucide-react"; import type { ButtonConfig } from "@/types/button"; import type { TitleSegment } from "@/components/cardStack/types"; import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants"; interface BulletPoint { title: string; description: string; icon?: LucideIcon; } interface SplitAboutProps { title: string; titleSegments?: TitleSegment[]; description: string; tag?: string; tagIcon?: LucideIcon; buttons?: ButtonConfig[]; bulletPoints: BulletPoint[]; imageSrc?: string; videoSrc?: string; imageAlt?: string; videoAriaLabel?: string; ariaLabel?: string; imagePosition?: "left" | "right"; textboxLayout: TextboxLayout; useInvertedBackground: InvertedBackground; className?: string; containerClassName?: string; textBoxClassName?: string; titleClassName?: string; titleImageWrapperClassName?: string; titleImageClassName?: string; descriptionClassName?: string; tagClassName?: string; buttonContainerClassName?: string; buttonClassName?: string; buttonTextClassName?: string; contentClassName?: string; bulletPointClassName?: string; bulletTitleClassName?: string; bulletDescriptionClassName?: string; mediaWrapperClassName?: string; imageClassName?: string; } const SplitAbout = ({ title, titleSegments, description, tag, tagIcon, buttons, bulletPoints, imageSrc, videoSrc, imageAlt = "", videoAriaLabel = "About section video", ariaLabel = "About section", imagePosition = "right", textboxLayout, useInvertedBackground, className = "", containerClassName = "", textBoxClassName = "", titleClassName = "", titleImageWrapperClassName = "", titleImageClassName = "", descriptionClassName = "", tagClassName = "", buttonContainerClassName = "", buttonClassName = "", buttonTextClassName = "", contentClassName = "", bulletPointClassName = "", bulletTitleClassName = "", bulletDescriptionClassName = "", mediaWrapperClassName = "", imageClassName = "", }: SplitAboutProps) => { const theme = useTheme(); const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle); const mediaContent = (
); return (
{imagePosition === "left" && mediaContent}
{bulletPoints.map((point, index) => { const Icon = point.icon; return (
{Icon && (
)}

{point.title}

{point.description}

{index < bulletPoints.length - 1 && (
)} ); })}
{imagePosition === "right" && mediaContent}
); }; SplitAbout.displayName = "SplitAbout"; export default memo(SplitAbout);