<?php

declare(strict_types=1);

use App\Framework\Performance\EnhancedPerformanceCollector;
use App\Framework\DateTime\SystemClock;
use App\Framework\DateTime\SystemHighResolutionClock;
use App\Framework\Core\AppBootstrapper;
use App\Framework\Performance\MemoryMonitor;

require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/../src/Framework/Debug/helpers.php';

// Konfiguration
$config = [
    'debug' => true,
    'async_discovery' => true,
    // weitere Konfigurationsoptionen...
];

// Anwendung initialisieren und ausführen
$basePath = dirname(__DIR__);
// Create dependencies for enhanced performance collector
$clock = new SystemClock();
$highResClock = new SystemHighResolutionClock();
$memoryMonitor = new MemoryMonitor();
$collector = new EnhancedPerformanceCollector($clock, $highResClock, $memoryMonitor, enabled: true);
$bootstrapper = new AppBootstrapper($basePath, $collector, $memoryMonitor);
$app = $bootstrapper->bootstrapWeb();

// Anwendung ausführen
$app->run();

exit;
