<?php
/**
 * ModuleInterface — Contract every module MUST satisfy.
 *
 * Modules are self-contained feature units. They receive the Plugin instance
 * via constructor injection and hook into WordPress/UltraGuard exclusively
 * through the hooks system.  No module may directly call another module;
 * all cross-module communication happens through WordPress actions/filters.
 *
 * Lifecycle:
 *   1. ModuleRegistry::boot()  calls Module::boot() for each registered module.
 *   2. Modules register their own add_action/add_filter inside boot().
 *   3. Admin-only setup (menu pages, assets) is gated with is_admin() or hooked
 *      to the ultraguard_pro/admin_initialized action.
 *
 * @package UltraguardPro\contracts
 */

namespace UltraguardPro\contracts;

if ( ! defined( 'ABSPATH' ) ) { exit; }

interface ModuleInterface {

    /**
     * Return the unique slug used to identify this module.
     *
     * @return string  e.g. 'firewall', 'antivirus', 'dashboard'
     */
    public function get_id(): string;

    /**
     * Bootstrap the module: register hooks, init subcomponents, etc.
     *
     * Called once by ModuleRegistry after all core services are ready.
     *
     * @return void
     */
    public function boot(): void;

    /**
     * Whether the module is currently active (enabled by settings / license).
     *
     * @return bool
     */
    public function is_enabled(): bool;
}
