<?php

declare(strict_types=1);

namespace apexl\Io\modules\user\hooks;

use apexl\Io\collections\DaedalusCommandCollection;
use apexl\Io\interfaces\AbstractHook;
use apexl\Io\modules\user\Commands\UserAssignPermissionCommand;
use apexl\Io\modules\user\Commands\UserAssignRoleCommand;
use apexl\Io\modules\user\Commands\UserListPermissionsCommand;
use apexl\Io\modules\user\Commands\UserListRolesCommand;
use apexl\Io\modules\user\Commands\UserResetPasswordCommand;

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

    public function __invoke(DaedalusCommandCollection $commands): DaedalusCommandCollection
    {

        $commands->add(UserResetPasswordCommand::class);
        $commands->add(UserAssignRoleCommand::class);
        $commands->add(UserAssignPermissionCommand::class);
        $commands->add(UserListRolesCommand::class);
        $commands->add(UserListPermissionsCommand::class);

        return $commands;
    }
}
