import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
import { AIProviderTab } from "./AIProviderTab"
import { DataSourceTab } from "./DataSourceTab"
import { TemplateTab } from "./TemplateTab"
import { SystemTab } from "./SystemTab"

export function ConfigPage() {
  return (
    <div className="container py-8 space-y-6">
      <div className="flex flex-col gap-2">
        <h1 className="text-3xl font-bold tracking-tight">系统配置</h1>
        <p className="text-muted-foreground">
          管理 AI 模型、数据源和分析模板。
        </p>
      </div>

      <Tabs defaultValue="providers" className="space-y-4">
        <TabsList>
          <TabsTrigger value="providers">AI Provider</TabsTrigger>
          <TabsTrigger value="datasources">数据源配置</TabsTrigger>
          <TabsTrigger value="templates">分析模板</TabsTrigger>
          <TabsTrigger value="system">系统</TabsTrigger>
        </TabsList>
        
        <TabsContent value="providers" className="space-y-4">
          <AIProviderTab />
        </TabsContent>
        <TabsContent value="datasources" className="space-y-4">
          <DataSourceTab />
        </TabsContent>
        <TabsContent value="templates" className="space-y-4">
          <TemplateTab />
        </TabsContent>
        <TabsContent value="system" className="space-y-4">
          <SystemTab />
        </TabsContent>
      </Tabs>
    </div>
  )
}

