<?php

declare(strict_types=1);

namespace ImovelZapAi\Financial\Infrastructure\Listeners;

use ImovelZapAi\Financial\Application\Actions\SeedFinancialFromSignatureAction;
use ImovelZapAi\Signatures\Domain\Events\SignatureCompleted;

final class SeedFinancialOnSignatureCompleted
{
    public function __construct(
        private readonly SeedFinancialFromSignatureAction $seed,
    ) {}

    public function handle(SignatureCompleted $event): void
    {
        $this->seed->execute($event->tenantId, $event->signatureRequestId);
    }
}
