import React, { useState } from 'react';
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
import CarbonFootprint from '@/components/sustainability/CarbonFootprint';
import EnergyManagement from '@/components/sustainability/EnergyManagement';
import WasteTracking from '@/components/sustainability/WasteTracking';
import SustainabilityGoals from '@/components/sustainability/SustainabilityGoals';
import { Leaf } from 'lucide-react';

const Sustainability = () => {
  const [activeTab, setActiveTab] = useState('carbon');

  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">
          <Leaf className="w-8 h-8 text-green-600" />
          <div>
            <h1 className="text-3xl font-bold text-gray-900">Sustainability Dashboard</h1>
            <p className="text-gray-600">Track and improve environmental impact</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="carbon">Carbon Footprint</TabsTrigger>
            <TabsTrigger value="energy">Energy</TabsTrigger>
            <TabsTrigger value="waste">Waste</TabsTrigger>
            <TabsTrigger value="goals">Goals</TabsTrigger>
          </TabsList>

          <TabsContent value="carbon">
            <CarbonFootprint />
          </TabsContent>

          <TabsContent value="energy">
            <EnergyManagement />
          </TabsContent>

          <TabsContent value="waste">
            <WasteTracking />
          </TabsContent>

          <TabsContent value="goals">
            <SustainabilityGoals />
          </TabsContent>
        </Tabs>
      </div>
    </div>
  );
};

export default Sustainability;
