import { useState } from 'react'; import { stepTemplates } from '../data/steps'; import { KEYWORDS } from '../utils/keywords'; interface StepLibraryProps { onAddStep: (stepType: string, stepText: string) => void; language?: 'es' | 'en'; } const iconMap: { [key: string]: string } = { Given: 'check_circle', When: 'play_circle', Then: 'track_changes', And: 'add', }; const colorMap: { [key: string]: string } = { Given: 'text-purple-600 hover:bg-purple-50', When: 'text-orange-600 hover:bg-orange-50', Then: 'text-pink-600 hover:bg-pink-50', And: 'text-gray-600 hover:bg-gray-50', }; function StepLibrary({ onAddStep, language = 'es' }: StepLibraryProps) { const [searchTerm, setSearchTerm] = useState(""); const filterSteps = (steps: string[]) => { if (!searchTerm) return steps; return steps.filter((step) => step.toLowerCase().includes(searchTerm.toLowerCase())); }; return ( ); } export default StepLibrary;