<?php

namespace App\Modules\FactTypeOperation\Application\Index;

use App\Modules\FactTypeOperation\Application\Index\FactTypeOperationIndexerResponse;
use App\Modules\FactTypeOperation\Domain\IdFactTypeOperation;
use App\Modules\FactTypeOperation\Domain\FactTypeOperationRepository;
use App\Modules\FactTypeOperation\Domain\IndexFactTypeOperation;

final class FactTypeOperationIndexer
{
    public function __construct(private FactTypeOperationRepository $repository)
    {
    }

    public function __invoke(IdFactTypeOperation $idFactTypeOperation)
    {
        $index = $this->repository->find(new IndexFactTypeOperation($idFactTypeOperation));
        return $index;
    }
}
