import React from 'react'; import { WizardState, Waypoint } from '../types'; import { Plus, Trash2, MapPin } from 'lucide-react'; interface StepWaypointsProps { data: WizardState; updateData: (updates: Partial) => void; } const StepWaypoints: React.FC = ({ data, updateData }) => { const addWaypoint = () => { if (data.waypoints.length >= 10) return; const newWaypoint: Waypoint = { id: crypto.randomUUID(), header: '', context: '' }; updateData({ waypoints: [...data.waypoints, newWaypoint] }); }; const removeWaypoint = (id: string) => { if (data.waypoints.length <= 1) return; // Keep at least one updateData({ waypoints: data.waypoints.filter(wp => wp.id !== id) }); }; const updateWaypoint = (id: string, field: keyof Waypoint, value: string) => { const updatedWaypoints = data.waypoints.map(wp => wp.id === id ? { ...wp, [field]: value } : wp ); updateData({ waypoints: updatedWaypoints }); }; return (

Opisz Kluczowe Momenty

Gdzie nastąpił przełom? Co czułeś?

{data.waypoints.length} / 10
{data.waypoints.map((wp, index) => (
updateWaypoint(wp.id, 'header', e.target.value)} placeholder="np. 10km - Ściana" className="w-full border-b border-gray-200 pb-2 focus:border-[#EA4420] focus:outline-none text-gray-900 font-bold text-lg placeholder-gray-300 bg-transparent transition-colors" />