/**
 * Work Notes Tab Component
 */

import { WorkNoteChat } from '@/components/workNote/WorkNoteChat/WorkNoteChat';

interface WorkNotesTabProps {
  requestId: string;
  requestTitle: string;
  mergedMessages: any[];
  setWorkNoteAttachments: (attachments: any[]) => void;
  isInitiator: boolean;
  isSpectator: boolean;
  currentLevels: any[];
  onAddApprover: (email: string, tatHours: number, level: number) => Promise<void>;
  maxApprovalLevels?: number;
  onPolicyViolation?: (violations: Array<{ type: string; message: string; currentValue?: number; maxValue?: number }>) => void;
}

export function WorkNotesTab({
  requestId,
  requestTitle,
  mergedMessages,
  setWorkNoteAttachments,
  isInitiator,
  isSpectator,
  currentLevels,
  onAddApprover,
  maxApprovalLevels,
  onPolicyViolation,
}: WorkNotesTabProps) {
  return (
    <div className="h-[calc(100vh-300px)] min-h-[600px]">
      <WorkNoteChat
        requestId={requestId}
        requestTitle={requestTitle}
        skipSocketJoin={true}
        messages={mergedMessages}
        onAttachmentsExtracted={setWorkNoteAttachments}
        isInitiator={isInitiator}
        isSpectator={isSpectator}
        currentLevels={currentLevels}
        onAddApprover={onAddApprover}
        maxApprovalLevels={maxApprovalLevels}
        onPolicyViolation={onPolicyViolation}
      />
    </div>
  );
}

