import React, { useState } from 'react';
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
import FleetOverview from '@/components/vehicles/FleetOverview';
import VehicleTracking from '@/components/vehicles/VehicleTracking';
import MaintenanceSchedule from '@/components/vehicles/MaintenanceSchedule';
import DriverManagement from '@/components/vehicles/DriverManagement';
import { Car } from 'lucide-react';

const VehicleManagement = () => {
  const [activeTab, setActiveTab] = useState('fleet');

  return (
    <div className="min-h-screen bg-gray-50 p-6">
      <div className="max-w-7xl mx-auto">
        <div className="flex items-center gap-3 mb-6">
          <Car className="w-8 h-8 text-orange-600" />
          <div>
            <h1 className="text-3xl font-bold text-gray-900">Vehicle Management</h1>
            <p className="text-gray-600">Monitor and manage your fleet</p>
          </div>
        </div>

        <Tabs value={activeTab} onValueChange={setActiveTab} className="space-y-6">
          <TabsList className="grid w-full grid-cols-4 lg:w-auto">
            <TabsTrigger value="fleet">Fleet Overview</TabsTrigger>
            <TabsTrigger value="tracking">Tracking</TabsTrigger>
            <TabsTrigger value="maintenance">Maintenance</TabsTrigger>
            <TabsTrigger value="drivers">Drivers</TabsTrigger>
          </TabsList>

          <TabsContent value="fleet">
            <FleetOverview />
          </TabsContent>

          <TabsContent value="tracking">
            <VehicleTracking />
          </TabsContent>

          <TabsContent value="maintenance">
            <MaintenanceSchedule />
          </TabsContent>

          <TabsContent value="drivers">
            <DriverManagement />
          </TabsContent>
        </Tabs>
      </div>
    </div>
  );
};

export default VehicleManagement;
