<?php

declare(strict_types=1);

namespace App\Support\Tenants;

use App\Models\ManagedEnvironment;
use App\Models\ManagedEnvironmentOnboardingSession;
use App\Models\User;

final readonly class TenantActionContext
{
    public function __construct(
        public ManagedEnvironment $tenant,
        public TenantLifecycle $lifecycle,
        public TenantActionSurface $surface,
        public ?User $actor,
        public ?int $workspaceId,
        public TenantInteractionLane $lane,
        public ?ManagedEnvironmentOnboardingSession $relatedOnboardingDraft,
        public bool $relatedOnboardingIsResumable,
        public bool $hasRelatedOnboardingDraft,
        public bool $isArchived,
    ) {}

    public function isOnboardingSurface(): bool
    {
        return $this->surface->isOnboardingSurface();
    }

    public function isGenericTenantManagementSurface(): bool
    {
        return $this->surface->isGenericTenantManagementSurface();
    }
}
