diff --git a/src/components/cost-estimator/cost-estimator-form.tsx b/src/components/cost-estimator/cost-estimator-form.tsx index 9c43a7b..c34c1b4 100644 --- a/src/components/cost-estimator/cost-estimator-form.tsx +++ b/src/components/cost-estimator/cost-estimator-form.tsx @@ -2,18 +2,20 @@ import React, { useState, useTransition } from 'react'; import { Step1ProjectType } from './step-1-project-type'; +import { Step2ServiceType } from './step-2-service-type'; import { Card, CardContent } from '@/components/ui/card'; import { AnimatePresence, motion } from 'framer-motion'; export type FormData = { projectType: 'website' | 'mobile-app' | 'platform' | null; - // Add more fields for subsequent steps + serviceType: 'entire-project' | 'development' | 'ui-ux-design' | 'identity-branding' | null; }; export function CostEstimatorForm() { const [currentStep, setCurrentStep] = useState(1); const [formData, setFormData] = useState({ projectType: null, + serviceType: null, }); const [isPending, startTransition] = useTransition(); @@ -38,12 +40,11 @@ export function CostEstimatorForm() { ); case 2: return ( -
-

Step 2: Define Your Project

-

This is where AI will help you define scope.

-

You selected: {formData.projectType}

-
- ) + + ); default: return ( void; + onUpdateData: (data: Partial) => void; +}; + +const serviceTypes = [ + { + id: 'entire-project', + title: 'Entire project', + }, + { + id: 'development', + title: 'Development', + }, + { + id: 'ui-ux-design', + title: 'UI/UX design', + }, + { + id: 'identity-branding', + title: 'Identity & branding', + }, +]; + +export function Step2ServiceType({ onNext, onUpdateData }: Step2Props) { + const [selectedService, setSelectedService] = React.useState(null); + + const handleSelect = (serviceId: 'entire-project' | 'development' | 'ui-ux-design' | 'identity-branding') => { + setSelectedService(serviceId); + onUpdateData({ serviceType: serviceId }); + }; + + return ( +
+

Choose Service

+
+ {serviceTypes.map((type) => ( + + ))} +
+
+
+
+
+
+
+ +
+
+ ); +}