<?php

declare(strict_types=1);

namespace UFPE\GoogleOIDC;

final class Plugin
{
    public static function boot(): void
    {
        $config = new Config();
        $client = new GoogleClient($config);
        $provisioner = new UserProvisioner($config);
        $auth = new AuthController($config, $client, $provisioner);

        (new LoginUI($config))->register();
        (new AdminSettings($config))->register();
        $auth->register();
    }

    public static function activate(): void
    {
        add_option(Config::OPTION, Config::defaults());
    }
}
