<?php

declare(strict_types=1);

namespace Apexl\Io\System\Hooks;

use Apexl\Io\Collections\DaedalusCommandCollection;
use Apexl\Io\Interfaces\HookInterface;
use Apexl\Io\System\Commands\CacheClearCommand;
use Apexl\Io\System\Commands\CacheViewCommand;
use Apexl\Io\System\Commands\DumpConfigCommand;
use Apexl\Io\System\Commands\DumpRoutesCommand;
use Apexl\Io\System\Commands\ModuleActivateCommand;
use Apexl\Io\System\Commands\ModuleCreateCommand;
use Apexl\Io\System\Commands\ModuleDeactivateCommand;
use Apexl\Io\System\Commands\ModuleListCommand;
use Apexl\Io\System\Commands\SendEmailCommand;

final readonly class ConsoleCommands implements HookInterface
{
    public static function hooks(): array
    {
        return ['consoleCommands'];
    }

    public function __invoke(DaedalusCommandCollection $commands): DaedalusCommandCollection
    {
        $commands->add(CacheViewCommand::class);
        $commands->add(CacheClearCommand::class);
        $commands->add(ModuleListCommand::class);
        $commands->add(ModuleCreateCommand::class);
        $commands->add(ModuleActivateCommand::class);
        $commands->add(ModuleDeactivateCommand::class);
        $commands->add(DumpConfigCommand::class);
        $commands->add(DumpRoutesCommand::class);
        $commands->add(SendEmailCommand::class);

        return $commands;
    }
}
