<?php

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

{{ imports }}

final class Insert{{ module }}Handler implements CommandHandler
{
    public function __construct(private {{ module }}Inserter $inserter) {}

    public function __invoke(Insert{{ module }}Command $command): Insert{{ module }}Response
    {
        $model = new {{ module }}(
{{ args }}
        );

        return new Insert{{ module }}Response(
            $this->inserter->__invoke($model, $command->idAdmin)
        );
    }
}
