<?php

declare(strict_types=1);

namespace apexl\Io\modules\user\hooks;

use apexl\Io\interfaces\AbstractHook;
use apexl\Io\modules\template\services\MultipleFilesystemLoader;
use apexl\Io\modules\template\Services\TemplateService;

final readonly class RegisterTemplateFolder implements AbstractHook
{

    public function hooks(): array
    {
        return [TemplateService::HOOK__LOADER];
    }

    public function __invoke(MultipleFilesystemLoader $loader): void
    {
        $loader->addDirectory(__DIR__ . '/../templates');
    }
}
