<?php

namespace App\Modules\ProviderTypeProvider\Application\Create;

use App\Modules\ProviderTypeProvider\Application\Create\ProviderTypeProviderInserterResponse;
use App\Modules\ProviderTypeProvider\Domain\ProviderTypeProvider;
use App\Modules\ProviderTypeProvider\Domain\ProviderTypeProviderRepository;

final class ProviderTypeProviderInserter
{
    public function __construct(private ProviderTypeProviderRepository $repository)
    {
    }

    public function __invoke(ProviderTypeProvider $ProviderTypeProvider): ProviderTypeProviderInserterResponse
    {
        return new ProviderTypeProviderInserterResponse($this->repository->insert($ProviderTypeProvider));
    }
}
