<?php
/**
 * Coming soon module placeholder.
 *
 * @package MonitorCat\Modules\ComingSoon
 */

declare(strict_types=1);

namespace MonitorCat\Modules\ComingSoon;

defined( 'ABSPATH' ) || exit;

use MonitorCat\Container;
use MonitorCat\Module\ModuleInterface;

/**
 * Placeholder module that provides metadata for upcoming features.
 *
 * This module is always inactive and serves only to display
 * coming-soon cards on the dashboard.
 */
final class ComingSoonModule implements ModuleInterface {

	/**
	 * Coming-soon module placeholders.
	 *
	 * @var array<string, array{name: string, icon: string, desc: string}>
	 */
	public const PLACEHOLDERS = array(
		'security'  => array(
			'name' => 'Security',
			'icon' => 'fa-shield-halved',
			'desc' => 'Login protection and hardening',
		),
		'backup'    => array(
			'name' => 'Backup',
			'icon' => 'fa-cloud-arrow-up',
			'desc' => 'Scheduled backups',
		),
		'smtp'      => array(
			'name' => 'SMTP',
			'icon' => 'fa-envelope',
			'desc' => 'Mail configuration',
		),
		'redirects' => array(
			'name' => 'Redirect Manager',
			'icon' => 'fa-arrow-turn-right',
			'desc' => 'URL redirect management',
		),
		'scanner'   => array(
			'name' => 'Scanner',
			'icon' => 'fa-radar',
			'desc' => 'Malware and integrity scanning',
		),
	);

	/**
	 * DI container (unused but required by registry instantiation pattern).
	 *
	 * @var Container
	 */
	private Container $container;

	/**
	 * Constructor.
	 *
	 * @param Container $container DI container.
	 */
	public function __construct( Container $container ) {
		$this->container = $container;
	}

	/**
	 * Get the module slug.
	 *
	 * @return string
	 */
	public function slug(): string {
		return 'coming-soon';
	}

	/**
	 * Get the module name.
	 *
	 * @return string
	 */
	public function name(): string {
		return __( 'Coming Soon', 'monitor-cat' );
	}

	/**
	 * Get the FontAwesome icon class.
	 *
	 * @return string
	 */
	public function icon(): string {
		return 'fa-clock';
	}

	/**
	 * Get the module description.
	 *
	 * @return string
	 */
	public function description(): string {
		return __( 'Upcoming features and modules', 'monitor-cat' );
	}

	/**
	 * Whether this module is active.
	 *
	 * Always returns false — this is a placeholder module.
	 *
	 * @return bool
	 */
	public function is_active(): bool {
		return false;
	}

	/**
	 * Boot the module. No-op for coming-soon modules.
	 */
	public function boot(): void {
		// No hooks to register for placeholder modules.
	}

	/**
	 * Register REST API routes. No-op for coming-soon modules.
	 */
	public function register_routes(): void {
		// No endpoints for placeholder modules.
	}

	/**
	 * Get dashboard summary data.
	 *
	 * @return array<string, mixed>
	 */
	public function get_dashboard_summary(): array {
		return array(
			'placeholders' => self::PLACEHOLDERS,
		);
	}

	/**
	 * Get the coming-soon module placeholders.
	 *
	 * @return array<string, array{name: string, icon: string, desc: string}>
	 */
	public function get_placeholders(): array {
		return self::PLACEHOLDERS;
	}
}
