<?php

namespace App\Modules\WebContactMessageDetail\Application\CreateClient;

use App\Modules\WebContactMessageDetail\Domain\WebContactMessageDetail;
use App\Modules\WebContactMessageDetail\Domain\WebContactMessageDetailRepository;

final class WebContactMessageDetailClientCreator
{
    public function __construct(private WebContactMessageDetailRepository $repository) {}

    public function __invoke(WebContactMessageDetail $webContactMessageDetail): CreateClientWebContactMessageDetailResponse
    {
        return new CreateClientWebContactMessageDetailResponse($this->repository->insert($webContactMessageDetail));
    }
}
