import { useNavigate } from 'react-router-dom';
import { NewTicketWidget } from '@/components/widgets/NewTicketWidget';
import { BackButton } from '@/components/ui/BackButton'; // Importation de notre nouvel Atome

export default function NewTicket() {
  const navigate = useNavigate();

  return (
    <div className="max-w-4xl mx-auto py-8 px-4 space-y-6">

      {/* BOUTON DE RETOUR EXTRAIT */}
      <BackButton to="/support" label="Annuler et retourner au Service Desk" />

      {/* WIDGET DU FORMULAIRE */}
      <NewTicketWidget
        onCancel={() => navigate('/support')}
        onSuccess={(ticketId) => navigate(`/support/tickets/${ticketId}`)}
      />
    </div>
  );
}