-
-
+
+
diff --git a/src/components/cost-estimator/step-4-design-process.tsx b/src/components/cost-estimator/step-4-design-process.tsx
index ba98249..e8d0ca3 100644
--- a/src/components/cost-estimator/step-4-design-process.tsx
+++ b/src/components/cost-estimator/step-4-design-process.tsx
@@ -68,9 +68,9 @@ export function Step4DesignProcess({ onNext, onBack, onUpdateData, formData }: S
diff --git a/src/components/cost-estimator/step-5-page-count.tsx b/src/components/cost-estimator/step-5-page-count.tsx
new file mode 100644
index 0000000..2eee077
--- /dev/null
+++ b/src/components/cost-estimator/step-5-page-count.tsx
@@ -0,0 +1,102 @@
+"use client";
+
+import type { FormData } from './cost-estimator-form';
+import { Button } from '@/components/ui/button';
+import { Slider } from '@/components/ui/slider';
+import React, { useState, useMemo } from 'react';
+import { Gauge } from 'lucide-react';
+
+type Step5Props = {
+ onNext: () => void;
+ onBack: () => void;
+ onUpdateData: (data: Partial
) => void;
+ formData: FormData;
+};
+
+const pageLabels = [
+ "less than 5", // 0
+ "5 - 10 pages", // 1
+ "10 - 15 pages", // 2
+ "15 - 20 pages", // 3
+ "20 - 25 pages", // 4
+ "25 - 30 pages", // 5
+ "30 - 35 pages", // 6
+ "35 - 40 pages", // 7
+ "40 - 45 pages", // 8
+ "45 - 50 pages", // 9
+ "50+", // 10
+];
+
+const designHoursMap = {
+ custom: 60,
+ mockups: 30,
+ existing: 0,
+};
+
+const calculateHours = (pageCount: number, projectStage: number, designProcess: 'custom' | 'mockups' | 'existing' | null): number => {
+ const pageHours = pageCount * 6;
+ const stageHours = Math.round((projectStage / 100) * 50);
+ const designHours = designProcess ? designHoursMap[designProcess] : 0;
+ return pageHours + stageHours + designHours;
+};
+
+
+export function Step5PageCount({ onNext, onBack, onUpdateData, formData }: Step5Props) {
+ const [value, setValue] = useState([formData.pageCount]);
+
+ const handleSliderChange = (newValue: number[]) => {
+ setValue(newValue);
+ onUpdateData({ pageCount: newValue[0] });
+ };
+
+ const currentLabel = useMemo(() => {
+ const index = value[0];
+ return pageLabels[index];
+ }, [value]);
+
+ const estimatedHours = useMemo(() => {
+ const pages = value[0] === 10 ? 50 : (value[0] + 1) * 5 - 1; // Approx for calculation
+ return calculateHours(pages, formData.projectStage, formData.designProcess);
+ }, [value, formData.projectStage, formData.designProcess]);
+
+ return (
+
+
How many pages/screens do you have in mind?
+
+
+
{pageLabels[0]}
+
{pageLabels[10]}
+
+
+
+ {currentLabel}
+
+
+
+
+
+ {estimatedHours}+ hours
+
+
+
+
+ );
+}