<?php

declare(strict_types=1);

namespace Apexl\Io\Jobs;

use Apexl\Io\Interfaces\ProvidesHooksInterface;
use Apexl\Io\Jobs\Controllers\QueueProcessController;
use Apexl\Io\Jobs\Hooks\ConsoleCommands;
use Apexl\Io\Module;
use Apexl\Io\System\Interfaces\ProvidesRoutesInterface;

readonly class JobsModule extends Module implements ProvidesHooksInterface, ProvidesRoutesInterface
{
    public function routes(): void
    {
        $this->post('/queue/process', QueueProcessController::class)
            ->setName('jobs.queue.process');
    }

    public function hooks(): array
    {
        return [
            ConsoleCommands::class,
        ];
    }
}
