"use client"; import { memo } from "react"; import TextBox from "@/components/Textbox"; import Tag from "@/components/shared/Tag"; import { cls, shouldUseInvertedText } from "@/lib/utils"; import { useTheme } from "@/providers/themeProvider/ThemeProvider"; import type { LucideIcon } from "lucide-react"; import type { InvertedBackground } from "@/providers/themeProvider/config/constants"; import type { ButtonConfig } from "@/types/button"; interface ProcessStep { number: string; title: string; description: string; tag?: string; } interface FeatureProcessStepsProps { title: string; description: string; tag?: string; tagIcon?: LucideIcon; buttons?: ButtonConfig[]; steps: ProcessStep[]; useInvertedBackground: InvertedBackground; ariaLabel?: string; className?: string; containerClassName?: string; gridClassName?: string; leftColumnClassName?: string; rightColumnClassName?: string; textBoxClassName?: string; titleClassName?: string; descriptionClassName?: string; tagClassName?: string; buttonContainerClassName?: string; buttonClassName?: string; buttonTextClassName?: string; stepsContainerClassName?: string; stepClassName?: string; stepNumberClassName?: string; stepContentClassName?: string; stepTitleClassName?: string; stepTagClassName?: string; stepDescriptionClassName?: string; } const FeatureProcessSteps = ({ title, description, tag, tagIcon, buttons, steps, useInvertedBackground, ariaLabel = "Process steps section", className = "", containerClassName = "", gridClassName = "", leftColumnClassName = "", rightColumnClassName = "", textBoxClassName = "", titleClassName = "", descriptionClassName = "", tagClassName = "", buttonContainerClassName = "", buttonClassName = "", buttonTextClassName = "", stepsContainerClassName = "", stepClassName = "", stepNumberClassName = "", stepContentClassName = "", stepTitleClassName = "", stepTagClassName = "", stepDescriptionClassName = "", }: FeatureProcessStepsProps) => { const theme = useTheme(); const shouldUseLightText = shouldUseInvertedText(useInvertedBackground, theme.cardStyle); return (
{steps && steps.length > 0 && (
{steps.map((step, index) => (
{/* Number box with line below */}

{step.number}

{/* Line segment */} {index < steps.length - 1 && (
)}

{step.title}

{step.tag && ( )}

{step.description}

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