<?php

namespace App\Contracts\Hardening;

use App\Exceptions\Hardening\ProviderAccessHardeningRequired;
use App\Models\ManagedEnvironment;

interface WriteGateInterface
{
    /**
     * Evaluate whether a write operation is allowed for the given tenant.
     *
     * @throws ProviderAccessHardeningRequired when the operation is blocked
     */
    public function evaluate(ManagedEnvironment $tenant, string $operationType): void;

    /**
     * Check whether the gate would block a write operation for the given tenant.
     *
     * Non-throwing variant for UI disabled-state checks.
     */
    public function wouldBlock(ManagedEnvironment $tenant): bool;
}
