<?php

namespace App\Mail;

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

class InsertNormaleCcExMail extends Mailable
{
    use Queueable, SerializesModels;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    protected $noteC;
    protected $noteE;
    protected $echelle;
    protected $intituleEcu;
    protected $sujet;
    protected $moy;
    public function __construct(array $data)
    {
        $this->noteC = $data['noteC'];
        $this->noteE = $data['noteE'];
        $this->echelle = $data['echelle'];
        $this->intituleEcu = $data['intituleEcu'];
        $this->sujet = $data['sujet'];
        $this->moy = $data['moy'];
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this->subject($this->sujet)
            ->view('emails.insertionNormalCcEx')->with([
                'noteC' => $this->noteC,
                'noteE' => $this->noteE,
                'moy' => $this->moy,
                'echelle' => $this->echelle,
                'intituleEcu' => $this->intituleEcu,
            ]);
    }
}
