<?php

declare(strict_types=1);

namespace App\Modules\Identity\Support;

class OidcProviderConfig
{
    /**
     * @param array<int, string> $scopes
     */
    public function __construct(
        public readonly string $providerKey,
        public readonly string $driver,
        public readonly string $clientId,
        public readonly string $redirectUri,
        public readonly array $scopes,
    ) {
    }

    public function toArray(): array
    {
        return [
            'provider_key' => $this->providerKey,
            'driver' => $this->driver,
            'client_id' => $this->clientId,
            'redirect_uri' => $this->redirectUri,
            'scopes' => $this->scopes,
        ];
    }
}
