<?php
/**
 * ModuleInterface definition.
 *
 * Contract for all Firevert modules. Defines required lifecycle methods.
 *
 * @package Ilabs\Firevert\Core
 */

declare( strict_types=1 );

namespace Ilabs\Firevert\Core;

/**
 * Interface for all Firevert modules.
 */
interface ModuleInterface {

	/**
	 * Returns the unique module slug.
	 *
	 * @return string Module identifier.
	 */
	public function get_slug(): string;

	/**
	 * Returns the unique cpt module slug.
	 *
	 * @return string Module CPT identifier.
	 */
	public function get_cpt_slug(): string;
	/**
	 * Returns the unique module folder name.
	 *
	 * @return string|null Module folder, null for addon.
	 */
	public function get_folder_name(): ?string;

	/**
	 * Install module default settings.
	 *
	 * @param ServiceContainer $container Service container instance.
	 *
	 * @return void
	 */
	public function install_default_settings( ServiceContainer $container ): void;

	/**
	 * Registers module services into DI container.
	 *
	 * @param ServiceContainer $container Service container instance.
	 *
	 * @return void
	 */
	public function register_services( ServiceContainer $container ): void;

	/**
	 * Registers module-specific settings.
	 *
	 * @param ServiceContainer $container Service container instance.
	 * @param bool             $is_enabled Whether the module is enabled.
	 *
	 * @return void
	 */
	public function register_settings( ServiceContainer $container, bool $is_enabled ): void;

	/**
	 * Registers all WordPress hooks.
	 *
	 * @param ServiceContainer $container Service container instance.
	 *
	 * @return void
	 */
	public function register_hooks( ServiceContainer $container ): void;

	/**
	 * Determines whether the module requires an active license.
	 *
	 * @return bool True if license is required, false otherwise.
	 */
	public function requires_licence(): bool;

	/**
	 * Renders the settings view for the module in admin.
	 *
	 * @return void
	 */
	public function render_settings_view(): void;

	/**
	 * Registers module assets (JS/CSS) with the AssetLoader.
	 *
	 * @param ServiceContainer $container Get from DI container.
	 *
	 * @return void
	 */
	public function enqueue_assets( ServiceContainer $container ): void;
}
