<?php

namespace App\Libraries;

class InvoicePdf
{
    public function generate(array $invoice, array $items): string
    {
        $document = array_merge($invoice, [
            "quotation_number" => $invoice["invoice_number"],
            "quotation_date" => $invoice["invoice_date"],
            "valid_until" => $invoice["due_date"],
        ]);

        return (new QuotationPdf())->generate($document, $items, "invoice");
    }
}
