feat: implement ChatInput and ChatWindow components for interactive messaging interface

This commit is contained in:
Syed waseem
2026-09-09 10:49:51 +05:30
parent f2e182f586
commit fbf70c9126
2 changed files with 1 additions and 35 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
import { useState, useRef, KeyboardEvent } from 'react';
import { useState, useRef, type KeyboardEvent } from 'react';
import { PaperPlaneRightIcon } from '@phosphor-icons/react';
import { CustomButton } from '../../../components/custom';
-34
View File
@@ -15,20 +15,6 @@ interface ChatWindowProps {
onSendMessage: (text: string) => void;
}
const SUGGESTIONS = [
{
title: 'What is IROPS?',
desc: 'Learn about Irregular Operations and how flight disruptions are categorized.',
},
{
title: 'Policy Engine Overview',
desc: 'Understand how business rules, compensation parameters, and gates evaluate.',
},
{
title: 'Cohort Targeting Rules',
desc: 'Explore passenger segmentation by loyalty tier, cabin class, and sector.',
},
];
export function ChatWindow({
activeConversation,
@@ -96,26 +82,6 @@ export function ChatWindow({
<h3 className="text-xl font-bold text-slate-900 mb-2">
How can I help with Aero Resolve today?
</h3>
<p className="text-sm text-slate-500 mb-8 max-w-md">
Ask questions about Irregular Operations (IROPS), passenger recovery policies, or audience cohort segmentation.
</p>
<div className="grid grid-cols-1 md:grid-cols-3 gap-3 w-full">
{SUGGESTIONS.map((s, idx) => (
<button
key={idx}
onClick={() => onSendMessage(s.title)}
className="text-left p-4 rounded-xl border border-slate-200/80 hover:border-[#1B9869] bg-slate-50/50 hover:bg-emerald-50/30 transition-all group"
>
<div className="text-[13px] font-bold text-slate-800 group-hover:text-[#1B9869] mb-1">
{s.title}
</div>
<div className="text-[11px] text-slate-500 leading-snug">
{s.desc}
</div>
</button>
))}
</div>
</div>
) : (
/* Messages List */