<?php
/**
 * Recording clone strategy contract.
 *
 * @package ScheduledChanges
 */

namespace ScheduledChanges\Recording;

/**
 * Public contract for modules that need to copy provider-owned data to shadows.
 */
interface RecordingCloneStrategy {
	/**
	 * Stable provider or module identifier used in clone metadata.
	 */
	public function providerId(): string;

	/**
	 * Runs after the native shadow product and variation shadows exist.
	 */
	public function afterClone( RecordingCloneContext $context ): RecordingCloneStrategyResult;

	/**
	 * Cleans provider-owned shadow data.
	 *
	 * $reason is one of clone_failed, finalized, abandoned, or expired.
	 */
	public function cleanup( RecordingCloneContext $context, string $reason ): RecordingCloneStrategyResult;
}
