<?php

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

use App\Modules\{{ module }}\Domain\Id{{ module }};
use App\Modules\Shared\Domain\Bus\Command\CommandHandler;

final class Delete{{ module }}Handler implements CommandHandler
{
    public function __construct(private {{ module }}Deleter $deleter) {}

    public function __invoke(Delete{{ module }}Command $command): void
    {
        $this->deleter->__invoke(new Id{{ module }}($command->{{ prop }}), $command->idAdmin);
    }
}
