"use client"; import { useState } from "react"; import type { PublicQuoteView } from "@/lib/quote-service"; import { QuoteStep1Overview } from "./QuoteStep1Overview"; import { QuoteStep2Selection } from "./QuoteStep2Selection"; import { QuoteStep3Summary } from "./QuoteStep3Summary"; interface QuoteMultistepProps { quote: PublicQuoteView; } export function QuoteMultistep({ quote }: QuoteMultistepProps) { const [currentStep, setCurrentStep] = useState(1); const handleNextStep = () => { if (currentStep < 3) { setCurrentStep(currentStep + 1); } }; const handlePrevStep = () => { if (currentStep > 1) { setCurrentStep(currentStep - 1); } }; // Step progress indicator const stepIndicator = (
{[1, 2, 3].map((step) => (
{step}
{step < 3 && (
)}
))}
); return (
{stepIndicator} {currentStep === 1 && ( )} {currentStep === 2 && ( )} {currentStep === 3 && ( )}
); }