|
1 | 1 | "use client" |
2 | 2 |
|
3 | 3 | import { useState } from "react" |
4 | | -import { Button } from "@/components/ui/button" |
| 4 | + |
5 | 5 | import { GlassCard } from "./glass-card" |
6 | 6 | import { SectionHeader } from "./section-header" |
7 | 7 | import { TourWizardControlProps } from "./tour-wizard-control-props" |
8 | | -import { ChevronLeft, ChevronRight, Check, MapPin, Calendar, User, Settings, CheckCircle } from "lucide-react" |
| 8 | +import { Check, MapPin, Calendar, User, Settings, CheckCircle } from "lucide-react" |
9 | 9 |
|
10 | 10 | interface TourWizardData { |
11 | 11 | propertyType: string[] |
@@ -42,19 +42,6 @@ const initialData: TourWizardData = { |
42 | 42 | export function TourWizard() { |
43 | 43 | const [currentStep, setCurrentStep] = useState(1) |
44 | 44 | const [formData, setFormData] = useState<TourWizardData>(initialData) |
45 | | - const totalSteps = 5 |
46 | | - |
47 | | - const nextStep = () => { |
48 | | - if (currentStep < totalSteps) { |
49 | | - setCurrentStep(currentStep + 1) |
50 | | - } |
51 | | - } |
52 | | - |
53 | | - const prevStep = () => { |
54 | | - if (currentStep > 1) { |
55 | | - setCurrentStep(currentStep - 1) |
56 | | - } |
57 | | - } |
58 | 45 |
|
59 | 46 | const handleSubmit = () => { |
60 | 47 | console.log("[v0] Tour booking submitted:", formData) |
@@ -126,32 +113,9 @@ export function TourWizard() { |
126 | 113 | formData={formData} |
127 | 114 | onDataChange={handleWizardChange} |
128 | 115 | onStepChange={setCurrentStep} |
| 116 | + onSubmit={handleSubmit} |
| 117 | + onCancel={() => setCurrentStep(1)} |
129 | 118 | /> |
130 | | - |
131 | | - {/* Navigation Buttons */} |
132 | | - <div className="flex justify-between mt-8 pt-6 border-t border-white/10"> |
133 | | - <Button |
134 | | - variant="outline" |
135 | | - onClick={prevStep} |
136 | | - disabled={currentStep === 1} |
137 | | - className="glass border-gold text-gold hover:bg-gold hover:text-gold-foreground bg-transparent" |
138 | | - > |
139 | | - <ChevronLeft className="w-4 h-4 mr-2" /> |
140 | | - Previous |
141 | | - </Button> |
142 | | - |
143 | | - {currentStep < totalSteps ? ( |
144 | | - <Button onClick={nextStep} className="bg-gold text-gold-foreground hover:bg-gold/90"> |
145 | | - Next |
146 | | - <ChevronRight className="w-4 h-4 ml-2" /> |
147 | | - </Button> |
148 | | - ) : ( |
149 | | - <Button onClick={handleSubmit} className="bg-gold text-gold-foreground hover:bg-gold/90"> |
150 | | - <Check className="w-4 h-4 mr-2" /> |
151 | | - Submit Tour Request |
152 | | - </Button> |
153 | | - )} |
154 | | - </div> |
155 | 119 | </div> |
156 | 120 | </div> |
157 | 121 | ) |
|
0 commit comments