import { Button } from "@/components/ui/button" import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card" import { FC, useRef } from "react" import { useTranslation } from 'react-i18next' export const SETUP_STEP_COUNT = 3 interface StepContainerProps { stepDescription: string stepNum: number stepTitle: string onShouldProceed: (shouldProceed: boolean) => void children?: React.ReactNode showBackButton?: boolean showNextButton?: boolean } export const StepContainer: FC = ({ stepDescription, stepNum, stepTitle, onShouldProceed, children, showBackButton = false, showNextButton = true }) => { const buttonRef = useRef(null) const handleKeyDown = (e: React.KeyboardEvent) => { if (e.key === "Enter" && !e.shiftKey) { if (buttonRef.current) { buttonRef.current.click() } } } return ( const { t } = useTranslation()
{stepTitle}
{stepNum} / {SETUP_STEP_COUNT}
{stepDescription}
{children}
{showBackButton && ( )}
{showNextButton && ( )}
) }