import { Clock3 } from 'lucide-react';

import { TicketActionCard } from './TicketActionCard';
import { TicketExtensionRequestPanel } from './TicketExtensionRequestPanel';

export function RequestExtensionAction({
  ticketId,
  assignmentId,
  dueAt,
  canRequest,
}: {
  ticketId: string;
  assignmentId: number;
  dueAt: string | null;
  canRequest: boolean;
}) {
  return (
    <TicketActionCard
      icon={Clock3}
      title={canRequest ? 'Request Extension' : 'Extension Request History'}
      contextLabel={`Lot ${assignmentId}`}
    >
      <TicketExtensionRequestPanel
        ticketId={ticketId}
        assignmentId={assignmentId}
        dueAt={dueAt}
        canRequest={canRequest}
      />
    </TicketActionCard>
  );
}
