import { useState } from 'react';
import { Tabs, TabsContent, TabsList, TabsTrigger } from '../../ui/tabs';
import { DriverTask } from './DriverTask';
import { IssueManagement } from './IssueManagement';
import { DriverRecord } from '../../../types/driver';

interface DriverTaskManagementProps {
  drivers: DriverRecord[];
}

export function DriverTaskManagement({ drivers }: DriverTaskManagementProps) {
  const [activeTab, setActiveTab] = useState('tasks');

  return (
    <div className="space-y-6">
      <Tabs value={activeTab} onValueChange={setActiveTab}>
        <TabsList>
          <TabsTrigger value="tasks">任务管理</TabsTrigger>
          <TabsTrigger value="issues">问题管理</TabsTrigger>
        </TabsList>

        <TabsContent value="tasks" className="mt-6">
          <DriverTask />
        </TabsContent>

        <TabsContent value="issues" className="mt-6">
          <IssueManagement />
        </TabsContent>
      </Tabs>
    </div>
  );
}
