<?php

namespace VulnTitan\Services;

use VulnTitan\SpamProtection\FormProviderRegistry;

class FormSpamService
{
    protected static bool $booted = false;

    public static function boot(): void
    {
        if (self::$booted) {
            return;
        }

        self::$booted = true;

        foreach (FormProviderRegistry::all() as $provider) {
            if (!$provider->isAvailable()) {
                continue;
            }

            $provider->boot();
        }
    }
}
