<?php

namespace App\Mail;

use App\Models\Core\Mail\MailTemplate;
use App\Repositories\Shop\Traits\MailCustomers;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Spatie\MailTemplates\TemplateMailable;

class Preparation extends TemplateMailable
{
    use MailCustomers, Queueable, SerializesModels;

    public $email;

    public $nom;

    public $prenom;

    public $societe;

    public $subject;

    protected static $templateModelClass = MailTemplate::class;

    public function __construct($order)
    {
        $this->prenom = $order->customer->first_name;
        $this->nom = $order->customer->last_name;
        $this->societe = $order->customer->company;
        $this->email = $order->customer->email;
    }
}
