<?php

declare(strict_types=1);

namespace Apexl\Io\User\Hooks;

use Apexl\Io\Interfaces\AbstractHook;
use Apexl\Io\Template\Services\MultipleFilesystemLoader;
use Apexl\Io\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');
    }
}
