<?php
/**
 * Language provider interface.
 *
 * @package Ilabs\Firevert\Core\Integration\Language
 */

declare( strict_types=1 );

namespace Ilabs\Firevert\Core\Integration\Language;

/**
 * Interface LanguageProviderInterface
 *
 * Defines methods for language providers to implement.
 *
 * @since 1.0.0
 */
interface LanguageProviderInterface {

	/**
	 * Returns the readable name of the source plugin (e.g. "WPML Multilingual CMS").
	 *
	 * @return string Plugin name.
	 */
	public function get_plugin_name(): string;

	/**
	 * Returns the readable name of the source plugin creator (e.g. "OnTheGoSystems").
	 *
	 * @return string Plugin creator.
	 */
	public function get_plugin_creator(): string;

	/**
	 * Checks if the language provider is active.
	 *
	 * @return bool True if provider is active, false otherwise.
	 * @since 1.0.0
	 */
	public function is_active(): bool;

	/**
	 * Returns current language slug.
	 *
	 * @return string|null Language slug (e.g., 'pl', 'en') or null if not available.
	 * @since 1.0.0
	 */
	public function get_current_slug(): ?string;

	/**
	 * Returns all available language slugs.
	 *
	 * @return array List of available language slugs (e.g., ['pl', 'en']).
	 * @since 1.0.0
	 */
	public function get_available_slugs(): array;

	/**
	 * Returns current locale.
	 *
	 * @return string|null Current locale (e.g., 'pl_PL') or null if not available.
	 * @since 1.0.0
	 */
	public function get_current_locale(): ?string;

	/**
	 * Returns all available locales.
	 *
	 * @return array List of available locales (e.g., ['pl_PL', 'en_GB']).
	 * @since 1.0.0
	 */
	public function get_available_locales(): array;

	/**
	 * Returns mapping between language slugs and locales.
	 *
	 * @return array Associative array mapping slugs to locales (e.g., ['pl' => 'pl_PL']).
	 * @since 1.0.0
	 */
	public function get_slug_to_locale_map(): array;

	/**
	 * Returns default language slug.
	 *
	 * @return string|null Default language slug (e.g., 'pl', 'en') or null if not available.
	 * @since 1.0.0
	 */
	public function get_default_slug(): ?string;

	/**
	 * Alternative method to get current slug for backward compatibility.
	 *
	 * @return string|null Current language slug or null if not available.
	 * @since 1.0.0
	 */
	public function is_current_slug(): ?string;
}
