<html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><?php

namespace Automattic\WooCommerce\Admin\PluginsInstallLoggers;

/**
 * A logger used in PluginsHelper::install_plugins to log the installation progress.
 */
interface PluginsInstallLogger {

	/**
	 * Called when a plugin install requested.
	 *
	 * @param string $plugin_name plugin name.
	 * @return mixed
	 */
	public function install_requested( string $plugin_name );

	/**
	 * Called when a plugin installed successfully.
	 *
	 * @param string $plugin_name plugin name.
	 * @param int    $duration # of seconds it took to install $plugin_name.
	 * @return mixed
	 */
	public function installed( string $plugin_name, int $duration);

	/**
	 * Called when a plugin activated successfully.
	 *
	 * @param string $plugin_name plugin name.
	 * @return mixed
	 */
	public function activated( string $plugin_name );

	/**
	 * Called when an error occurred while installing a plugin