import { useParams, useNavigate } from 'react-router-dom';
import { WorkNoteChat } from '@/components/workNote/WorkNoteChat';
import { PageLayout } from '@/components/layout/PageLayout';

export function WorkNotes() {
  const { requestId } = useParams<{ requestId: string }>();
  const navigate = useNavigate();

  const handleNavigate = (page: string) => {
    navigate(`/${page}`);
  };

  const handleNewRequest = () => {
    navigate('/new-request');
  };

  const handleLogout = () => {
    // Logout will be handled by App.tsx
    navigate('/login');
  };

  return (
    <PageLayout 
      currentPage="work-notes" 
      onNavigate={handleNavigate} 
      onNewRequest={handleNewRequest}
      onLogout={handleLogout}
    >
      <div className="h-full w-full overflow-hidden">
        <WorkNoteChat 
          requestId={requestId || ''}
        />
      </div>
    </PageLayout>
  );
}

