<?php
/**
 * Runtime validation environment.
 *
 * @package ScheduledChanges
 */

namespace ScheduledChanges\Validation;

use ScheduledChanges\Domain\Operation\Operation;
use ScheduledChanges\Domain\Operation\TargetDefinition;

/**
 * Isolates WordPress state checks from plan validation.
 */
interface ValidationEnvironment {
	public function targetExists( TargetDefinition $target ): bool;

	public function actualSubtype( TargetDefinition $target ): string;

	public function actorCan( int $actor_id, string $capability, TargetDefinition $target ): bool;

	public function targetFingerprint( TargetDefinition $target ): ?string;

	public function attachmentExists( int $attachmentId ): bool;

	public function termExists( int $termId, string $taxonomy ): bool;

	public function snapshotStorageAvailable(): bool;

	public function actionSchedulerHealthy(): bool;

	public function externalHealth( Operation $operation ): ValidationReport;
}
