<?php
namespace FleekDash\Core;

use FleekDash\CLI\MigrationCommands;

defined('ABSPATH') || exit;

/**
 * CLI Command Registration
 *
 * Registers all WP-CLI commands for FleekDash
 */
class CLI
{
    /**
     * Register all CLI commands
     */
    public static function register()
    {
        if (!defined('WP_CLI')) {
            return;
        }

        $migrations = new MigrationCommands();

        // Migration commands
        \WP_CLI::add_command('fleekdash migration:run', [$migrations, 'run']);
        \WP_CLI::add_command('fleekdash migration:rollback', [$migrations, 'rollback']);
        \WP_CLI::add_command('fleekdash migration:status', [$migrations, 'status']);
        \WP_CLI::add_command('fleekdash migration:reset', [$migrations, 'reset']);
        \WP_CLI::add_command('fleekdash migration:refresh', [$migrations, 'refresh']);

        // Database commands
        \WP_CLI::add_command('fleekdash db:health', [$migrations, 'health']);
    }
}
