<?php
namespace TeknoTok\AiTranslator\Providers;

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

/**
 * Interface for AI Translation Providers.
 */
interface ProviderInterface {
	/**
	 * Translate a text block or an array of key-value pairs.
	 *
	 * @param string|array $text        String or associative array of strings to translate.
	 * @param string       $source_lang Source language locale code (e.g., 'en').
	 * @param string       $target_lang Target language locale code (e.g., 'es').
	 * @return string|array Translated output.
	 * @throws \Exception
	 */
	public function translate( $text, $source_lang, $target_lang );

	/**
	 * Test provider configurations and credentials.
	 *
	 * @return bool True if configurations validate, false otherwise.
	 */
	public function validate_key();

	/**
	 * Check if provider is configured (e.g. API credentials are set).
	 *
	 * @return bool True if configured, false otherwise.
	 */
	public function is_configured();
}
