'use client'; import { type FC } from 'react'; import type { BotAccentColor } from '@/types/bot'; import { STEP_COLOR_SCHEMES } from '@/lib/config/colors'; /** * Step configuration for the steps section */ export interface BotStep { /** Step number (1-based) */ step: string; /** Emoji or icon for the step */ icon: string; /** Step title */ title: string; /** Step description */ description: string; } interface BotStepsSectionProps { /** Section title */ title: string; /** Array of steps */ steps: BotStep[]; /** Accent color for styling */ accentColor: BotAccentColor; /** Number of columns in the grid */ columns?: 3 | 4; /** Optional background gradient style */ variant?: 'card' | 'gradient-bg'; } /** * Shared Steps/How It Works section for bot pages * * @example * ```tsx * * ``` */ export const BotStepsSection: FC = ({ title, steps, accentColor, columns = 4, variant = 'card', }) => { const colors = STEP_COLOR_SCHEMES[accentColor]; const gridCols = columns === 3 ? 'lg:grid-cols-3' : 'lg:grid-cols-4'; if (variant === 'gradient-bg') { return (

{title}

{steps.map((item, idx) => (
{item.step}
{item.icon}

{item.title}

{item.description}

{/* Connector line between steps */} {idx < steps.length - 1 && (
)}
))}
); } // Card variant (simpler) return (

{title}

{steps.map((item) => (
{item.step}
{item.icon}

{item.title}

{item.description}

))}
); };