<?php

namespace App\Mail;

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


class Recibo extends Mailable
{
    use Queueable, SerializesModels;

    private $info = [];

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($info)
    {
        $this->info = $info;
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this
            ->markdown('emails.recibo', $this->info)
            ->subject('Recibo de Condominio '. $this->info['codApto'] .' '. $this->info['tMes'] .' '. $this->info['sAno']);
            /*
            ->attachFromStorage('3354-presentacion-TAORMINA.pdf', '3354-presentacion-TAORMINA.pdf', [
                'mime' => 'application/pdf'
            ]);
            */
    }

    /**
     * Get the attachments for the message.
     *
     * @return array<int, \Illuminate\Mail\Mailables\Attachment>
     */

/*    public function attachments(): array
    {
        return [
            Attachment::fromStorage('3355-presentacion.pdf')
                ->as('danoral-presentacion.pdf')
                ->withMime('application/pdf'),
        ];
    }
*/    

}
