<?php
/**
 * Interface for Omnibus price providers.
 *
 * @package Ilabs\Firevert\Core\Integration\Omnibus
 */

declare( strict_types=1 );

namespace Ilabs\Firevert\Core\Integration\Omnibus;

/**
 * Interface OmnibusProviderInterface
 */
interface OmnibusProviderInterface {

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

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

	/**
	 * Checks whether the provider's plugin is active.
	 *
	 * @return bool True if the plugin is active.
	 */
	public function is_active(): bool;

	/**
	 * Returns the lowest product price.
	 *
	 * @param int $product_id WooCommerce product ID.
	 *
	 * @return float|null Lowest price or null if not available.
	 */
	public function get_lowest_price( int $product_id ): ?float;

	/**
	 * Returns the lowest product price date.
	 *
	 * @param int $product_id WooCommerce product ID.
	 *
	 * @return string|null Lowest price date or null if not available.
	 */
	public function get_lowest_price_date( int $product_id ): ?string;

	/**
	 * Calculates the number of days since the lowest price date.
	 *
	 * @param int $product_id WooCommerce product ID.
	 *
	 * @return int|null Number of days since the lowest price date.
	 */
	public function get_lowest_price_days_ago( int $product_id ): ?int;
}
