<?php

declare(strict_types=1);

namespace ImovelZapAi\Financial\Infrastructure\Erp;

use ImovelZapAi\Financial\Application\Queries\GetDealFinancialStatementQuery;
use ImovelZapAi\Financial\Domain\Ports\FinancialErpExporterInterface;

final class StubOmieExporter implements FinancialErpExporterInterface
{
    public function __construct(
        private readonly GetDealFinancialStatementQuery $statement,
    ) {}

    public function exportDealStatement(string $tenantId, string $dealId): array
    {
        $statement = $this->statement->execute($tenantId, $dealId);

        return [
            'provider' => 'omie',
            'exported' => false,
            'deal_id' => $dealId,
            'summary' => $statement['summary'],
            'payload' => [
                'omie' => [
                    'status' => 'stub',
                    'message' => 'Integração Omie não configurada neste ambiente.',
                ],
            ],
        ];
    }
}
