<?php

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;

class AccountReceivableDeadlineReminderMail extends Mailable
{
    use Queueable, SerializesModels;

    protected $supplier;
    protected $accounts;

    public function __construct($supplier, $accounts)
    {
        $this->supplier = $supplier;
        $this->accounts = $accounts;
    }

    public function build()
    {
        return $this->view('emails.accountReceivableDeadlineReminderMail')
            ->subject('Plazo de pago expirado')
            ->with([
                'supplier' => $this->supplier,
                'accounts' => $this->accounts
            ]);
    }
}
