<?php

if (!defined('WD')) {
    define('WD', dirname(__DIR__, 2));
}

require_once WD . '/vendor/autoload.php';

use Webauthn\PublicKeyCredentialSource;
use Webauthn\AuthenticatorAssertionResponseValidator;

echo "Checking WebAuthn library installation...\n";

if (class_exists(PublicKeyCredentialSource::class)) {
    echo "✔ PublicKeyCredentialSource class exists\n";
} else {
    echo "✘ PublicKeyCredentialSource class does not exist\n";
    exit(1);
}

if (class_exists(AuthenticatorAssertionResponseValidator::class)) {
    echo "✔ AuthenticatorAssertionResponseValidator class exists\n";
} else {
    echo "✘ AuthenticatorAssertionResponseValidator class does not exist\n";
    exit(1);
}

echo "WebAuthn library installation verified.\n";
