<?php

declare(strict_types=1);

namespace Apexl\Io\Jobs\Hooks;

use Apexl\Io\Collections\DaedalusCommandCollection;
use Apexl\Io\Interfaces\AbstractHook;
use Apexl\Io\Jobs\Commands\JobQueueCommand;
use Apexl\Io\Jobs\Commands\RunJobsCommand;

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

    public function __invoke(DaedalusCommandCollection $commands): DaedalusCommandCollection
    {
        $commands->add(RunJobsCommand::class);
        $commands->add(JobQueueCommand::class);

        return $commands;
    }
}
