<?php

declare(strict_types=1);

namespace Builder\Core\Exceptions;

use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;

final class UnauthorizedAccessException extends BuilderException implements HttpExceptionInterface
{
    public static function forPermission(string $permission): self
    {
        return new self("Missing permission: {$permission}");
    }

    public function getStatusCode(): int
    {
        return 403;
    }

    /** @return array<string, string> */
    public function getHeaders(): array
    {
        return [];
    }
}
