<?php

declare(strict_types=1);

$root = getenv('POC_TARGET_ROOT');
if (!$root) exit(2);
$credentials = require __DIR__ . '/store-mysql/application/database.php';
foreach (['HOST' => 'hostname', 'PORT' => 'hostport', 'SCHEMA' => 'database',
    'USER' => 'username', 'PASSWORD' => 'password'] as $env => $key) {
    putenv('POC_' . $env . '=' . $credentials[$key]);
    putenv('POC_AI_' . $env . '=' . $credentials['ai_zhct'][$key]);
}
putenv('POC_DIALECT=mysql');
$script = getenv('POC_PROBE') === 'activity' ? 'verify_ai_activity_http.php' : 'verify_ai_activity_type_http.php';
require __DIR__ . '/' . $script;
