<?php

declare(strict_types=1);

namespace Jose\Component\Signature;

use Jose\Component\Core\AlgorithmManager;
use Jose\Component\Core\JWK;
use Jose\Component\Core\Util\KeyChecker;

class JWSBuilder
{
    public function __construct(
        AlgorithmManager $signatureAlgorithmManager
    ) {
    }

    /**
     * Returns the algorithm manager associated to the builder.
     */
    public function getSignatureAlgorithmManager(): AlgorithmManager
    {
    }

    /**
     * Reset the current data.
     */
    public function create(): self
    {
    }

    /**
     * Set the payload. This method will return a new JWSBuilder object.
     */
    public function withPayload(string $payload, bool $isPayloadDetached = false): self
    {
    }

    /**
     * Adds the information needed to compute the signature. This method will return a new JWSBuilder object.
     *
     * @psalm-param array{alg?: string, ...} $protectedHeader
     * @psalm-param array{alg?: string, ...} $header
     */
    public function addSignature(JWK $signatureKey, array $protectedHeader, array $header = []): self
    {
    }

    /**
     * Computes all signatures and return the expected JWS object.
     */
    public function build(): JWS
    {
    }
}
