import { useState } from 'react' import { AlertTriangle, Loader2 } from 'lucide-react' import { Modal } from '@/components/common/Modal' import { RichTextInput } from '@/components/common/RichTextInput' import type { EscalateSessionRequest } from '@/types/ai-session' import type { FileUploadResponse } from '@/types/upload' interface EscalateModalProps { open: boolean onClose: () => void onEscalate: (data: EscalateSessionRequest) => Promise isProcessing: boolean hasPsaTicket: boolean sessionId?: string } export function EscalateModal({ open, onClose, onEscalate, isProcessing, hasPsaTicket, sessionId }: EscalateModalProps) { const [reason, setReason] = useState('') const [_escalateUploads, setEscalateUploads] = useState([]) const handleSubmit = async () => { if (!reason.trim() || reason.trim().length < 5) return await onEscalate({ escalation_reason: reason.trim() }) setReason('') onClose() } const handleClose = () => { if (!isProcessing) { setReason('') onClose() } } return (

This will mark the session as requesting escalation. Team members will see it in their escalation queue and can pick it up with full context.

Minimum 5 characters. This will be shown to the engineer who picks up.

) }