import React, { useState } from 'react';
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
import BusinessList from '@/components/establishments/BusinessList';
import BusinessCategories from '@/components/establishments/BusinessCategories';
import BusinessAnalytics from '@/components/establishments/BusinessAnalytics';
import BusinessVerification from '@/components/establishments/BusinessVerification';
import { Store } from 'lucide-react';

const Establishments = () => {
  const [activeTab, setActiveTab] = useState('list');

  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">
          <Store className="w-8 h-8 text-orange-600" />
          <div>
            <h1 className="text-3xl font-bold text-gray-900">Gestión de Comercios</h1>
            <p className="text-gray-600">Administra establecimientos, categorías y verificaciones</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="list">Comercios</TabsTrigger>
            <TabsTrigger value="categories">Categorías</TabsTrigger>
            <TabsTrigger value="verification">Verificación</TabsTrigger>
            <TabsTrigger value="analytics">Analytics</TabsTrigger>
          </TabsList>

          <TabsContent value="list">
            <BusinessList />
          </TabsContent>

          <TabsContent value="categories">
            <BusinessCategories />
          </TabsContent>

          <TabsContent value="verification">
            <BusinessVerification />
          </TabsContent>

          <TabsContent value="analytics">
            <BusinessAnalytics />
          </TabsContent>
        </Tabs>
      </div>
    </div>
  );
};

export default Establishments;
