<?php

namespace App\Modules\{{ module }}\Application\Index;

use App\Modules\{{ module }}\Domain\{{ module }}Repository;
use App\Modules\{{ module }}\Domain\Id{{ module }};
use App\Modules\{{ module }}\Domain\Index{{ module }};

final class {{ module }}Indexer
{
    public function __construct(private {{ module }}Repository $repository) {}

    public function __invoke(Id{{ module }} $id): mixed
    {
        return $this->repository->find(new Index{{ module }}($id));
    }
}
