"use client"; import { memo } from "react"; import CardStack from "@/components/cardStack/CardStack"; import { cls, shouldUseInvertedText } from "@/lib/utils"; import { useTheme } from "@/providers/themeProvider/ThemeProvider"; import type { LucideIcon } from "lucide-react"; import type { ButtonConfig, GridVariant, CardAnimationType, TitleSegment } from "@/components/cardStack/types"; import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants"; type Metric = { id: string; value: string; title: string; description: string; icon: LucideIcon; }; interface MetricCardOneProps { metrics: Metric[]; carouselMode?: "auto" | "buttons"; gridVariant: GridVariant; uniformGridCustomHeightClasses?: string; animationType: CardAnimationType; title: string; titleSegments?: TitleSegment[]; description: string; tag?: string; tagIcon?: LucideIcon; buttons?: ButtonConfig[]; textboxLayout: TextboxLayout; useInvertedBackground: InvertedBackground; ariaLabel?: string; className?: string; containerClassName?: string; cardClassName?: string; textBoxTitleClassName?: string; textBoxTitleImageWrapperClassName?: string; textBoxTitleImageClassName?: string; textBoxDescriptionClassName?: string; valueClassName?: string; titleClassName?: string; descriptionClassName?: string; iconContainerClassName?: string; iconClassName?: string; gridClassName?: string; carouselClassName?: string; controlsClassName?: string; textBoxClassName?: string; textBoxTagClassName?: string; textBoxButtonContainerClassName?: string; textBoxButtonClassName?: string; textBoxButtonTextClassName?: string; } interface MetricCardItemProps { metric: Metric; shouldUseLightText: boolean; cardClassName?: string; valueClassName?: string; titleClassName?: string; descriptionClassName?: string; iconContainerClassName?: string; iconClassName?: string; } const MetricCardItem = memo(({ metric, shouldUseLightText, cardClassName = "", valueClassName = "", titleClassName = "", descriptionClassName = "", iconContainerClassName = "", iconClassName = "", }: MetricCardItemProps) => { return (

{metric.value} dakdakdmakdmakedmae

{metric.title}

{metric.description}

); }); MetricCardItem.displayName = "MetricCardItem"; const MetricCardOne = ({ metrics, carouselMode = "buttons", gridVariant, uniformGridCustomHeightClasses, animationType, title, titleSegments, description, tag, tagIcon, buttons, textboxLayout, useInvertedBackground, ariaLabel = "Metrics section", className = "", containerClassName = "", cardClassName = "", textBoxTitleClassName = "", textBoxTitleImageWrapperClassName = "", textBoxTitleImageClassName = "", textBoxDescriptionClassName = "", valueClassName = "", titleClassName = "", descriptionClassName = "", iconContainerClassName = "", iconClassName = "", gridClassName = "", carouselClassName = "", controlsClassName = "", textBoxClassName = "", textBoxTagClassName = "", textBoxButtonContainerClassName = "", textBoxButtonClassName = "", textBoxButtonTextClassName = "", }: MetricCardOneProps) => { const theme = useTheme(); const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle); return ( {metrics.map((metric, index) => ( ))} ); }; MetricCardOne.displayName = "MetricCardOne"; export default MetricCardOne;