'use client';

import { TestTube, PlayCircle, PauseCircle } from 'lucide-react';

import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/Card';

export function TestEnvironmentsTile() {
  // Mock data - in production, this would come from API
  const environments = {
    active: 3,
    stopped: 1,
    total: 4,
  };

  return (
    <Card className="bg-gray-800 border-gray-700">
      <CardHeader>
        <CardTitle className="text-white flex items-center gap-2">
          <TestTube className="h-5 w-5 text-orange-500" />
          Test Environments
        </CardTitle>
      </CardHeader>
      <CardContent>
        <div className="space-y-4">
          <div className="text-center">
            <p className="text-4xl font-bold text-white mb-2">{environments.total}</p>
            <p className="text-sm text-gray-400">Total Environments</p>
          </div>
          
          <div className="space-y-2">
            <div className="flex items-center justify-between p-2 bg-gray-900 rounded">
              <div className="flex items-center gap-2">
                <PlayCircle className="h-4 w-4 text-green-400" />
                <span className="text-sm text-gray-300">Active</span>
              </div>
              <span className="text-sm font-semibold text-white">{environments.active}</span>
            </div>
            
            {environments.stopped > 0 && (
              <div className="flex items-center justify-between p-2 bg-gray-900 rounded">
                <div className="flex items-center gap-2">
                  <PauseCircle className="h-4 w-4 text-gray-400" />
                  <span className="text-sm text-gray-300">Stopped</span>
                </div>
                <span className="text-sm font-semibold text-white">{environments.stopped}</span>
              </div>
            )}
          </div>
        </div>
      </CardContent>
    </Card>
  );
}

