import { motion } from 'framer-motion'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { RichTextEditor } from '@/components/ui/rich-text-editor'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group'; import { Badge } from '@/components/ui/badge'; import { FileText, Zap, Clock } from 'lucide-react'; import { FormData, RequestTemplate } from '@/hooks/useCreateRequestForm'; interface BasicInformationStepProps { formData: FormData; selectedTemplate: RequestTemplate | null; updateFormData: (field: keyof FormData, value: any) => void; } /** * Component: BasicInformationStep * * Purpose: Step 2 - Basic information form (title, description, priority) * * Features: * - Request title and description inputs * - Priority selection (Express/Standard) * - Template-specific additional fields * - Test IDs for testing */ export function BasicInformationStep({ formData, selectedTemplate, updateFormData }: BasicInformationStepProps) { return (

Basic Information

Provide the essential details for your {selectedTemplate?.name || 'request'}.

Be specific and descriptive. This will be visible to all participants.

updateFormData('title', e.target.value)} className="text-base h-12 border-2 border-gray-300 focus:border-blue-500 bg-white shadow-sm" data-testid="basic-information-title-input" />

Explain what you need approval for, why it's needed, and any relevant background information. 💡 Tip: You can paste formatted content (lists, tables) and the formatting will be preserved.

updateFormData('description', html)} placeholder="Provide comprehensive details about your request including scope, objectives, expected outcomes, and any supporting context that will help approvers make an informed decision." className="min-h-[120px] text-base border-2 border-gray-300 focus-within:border-blue-500 bg-white shadow-sm" minHeight="120px" data-testid="basic-information-description-textarea" />

select priority for your request

updateFormData('priority', value)} data-testid="basic-information-priority-radio-group" >
updateFormData('priority', 'express')} data-testid="basic-information-priority-express-option" >
URGENT

Includes calendar days in TAT - faster processing timeline

updateFormData('priority', 'standard')} data-testid="basic-information-priority-standard-option" >
DEFAULT

Includes working days in TAT - regular processing timeline

{/* Template-specific fields */} {(selectedTemplate?.fields.amount || selectedTemplate?.fields.vendor || selectedTemplate?.fields.timeline || selectedTemplate?.fields.impact) && (

Additional Details

{selectedTemplate?.fields.amount && (
updateFormData('amount', e.target.value)} className="text-base h-12 border-2 border-gray-300 focus:border-blue-500 bg-white shadow-sm" data-testid="basic-information-amount-input" />
)} {selectedTemplate?.fields.vendor && (
updateFormData('vendor', e.target.value)} className="text-base h-12 border-2 border-gray-300 focus:border-blue-500 bg-white shadow-sm" data-testid="basic-information-vendor-input" />
)}
updateFormData('costCenter', e.target.value)} className="text-base h-12 border-2 border-gray-300 focus:border-blue-500 bg-white shadow-sm" data-testid="basic-information-cost-center-input" />
updateFormData('project', e.target.value)} className="text-base h-12 border-2 border-gray-300 focus:border-blue-500 bg-white shadow-sm" data-testid="basic-information-project-input" />
)}
); }