<?php
/**
 * Contract every competitor adapter implements.
 *
 * @package StoreSheet
 */

declare( strict_types=1 );

namespace StoreSheet\Importer;

defined( 'ABSPATH' ) || exit;

interface SourceAdapter {

	/** Stable machine id, e.g. 'gsheetconnector'. */
	public function id(): string;

	/** Human label, e.g. 'GSheetConnector for WooCommerce'. */
	public function label(): string;

	/**
	 * Plugin basenames used for detection, e.g. 'wc-gsheetconnector/wc-gsheetconnector.php'.
	 *
	 * @return string[]
	 */
	public function plugin_files(): array;

	/** Cheap presence check (is_plugin_active or option-exists). No API calls. */
	public function is_present(): bool;

	/** Read the competitor's stored config into a normalized plan. */
	public function read_config(): ImportPlan;

	/** Whether this adapter can locate the competitor's spreadsheet id. */
	public function supports_sheet_adopt(): bool;
}
