"use client"; import Image from "next/image"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { useRouter } from "next/navigation"; import { AppStepper, type StepItem } from "@/components/app-stepper"; import { NavHint } from "@/components/nav-hint"; import { Button } from "@/components/ui/button"; import { useTranslation } from "@/lib/language-context"; import { cn } from "@/lib/utils"; type StepShellProps = { steps: StepItem[]; currentStep: number; previousHref?: string; nextHref?: string; showNavHint?: boolean; children: React.ReactNode; }; // Shell layout partage par toutes les etapes du tunnel. export function StepShell({ steps, currentStep, previousHref, nextHref, showNavHint = true, children }: StepShellProps) { const router = useRouter(); const { t } = useTranslation(); const currentLabel = steps.find((step) => step.id === currentStep)?.label ?? t("common.stepFallback"); return (
{/* Barre haute commune: navigation etat par etape + actions prev/next */}
{/* Mobile/fenetres etroites: navigation compacte sans scroll horizontal. */}
{currentLabel}
{/* Desktop: stepper complet par etapes. */}
{children} {showNavHint ? : null}
{/* Branding persistant en bas a gauche */} T4 transaction
); }