
'use client';

import { BookingForm } from '@/components/shared/BookingForm';
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
import { useState } from 'react';

export function InvoicesAdminTab() {
  const [formKey, setFormKey] = useState(Date.now());

  const handleBookingCreated = () => {
    // Reset the form by changing its key
    setFormKey(Date.now());
  };

  return (
    <Card>
      <CardContent className="pt-6">
        <BookingForm
          key={formKey}
          isAdminBooking={true}
          onBookingCreated={handleBookingCreated}
        />
      </CardContent>
    </Card>
  );
}
