<?php
/**
 * Provider contract for AI alt text generation.
 *
 * @package AIAltTextGenerator
 * @since 1.4.0
 */

namespace AIAltTextGenerator\Providers;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * @since 1.4.0
 */
interface ProviderInterface {

	public function getId(): string;

	public function getLabel(): string;

	/**
	 * @param array<string, mixed> $options
	 * @return array{alt_text: string, tokens: int}|\WP_Error
	 */
	public function generate( string $file_path, array $options = [] ): array|\WP_Error;

	public function supportsVision(): bool;

	/**
	 * Verify API connectivity.
	 *
	 * @return true|\WP_Error
	 */
	public function testConnection( array $options = [] ): bool|\WP_Error;
}
