<?php

namespace App\Mail;

use App\Models\Customer;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;

class VerifyCustomerEmailCodeMail extends Mailable
{
    use Queueable, SerializesModels;

    public Customer $customer;
    public string $code;

    /**
     * Create a new message instance.
     */
    public function __construct(Customer $customer, string $code)
    {
        $this->customer = $customer;
        $this->code = $code;
    }

    /**
     * Email metadata
     */
    public function envelope(): Envelope
    {
        return new Envelope(
            subject: 'Código de verificação - LK Fashion',
        );
    }

    /**
     * Email content
     */
    public function content(): Content
    {
        return new Content(
            view: 'emails.customer-verify-code',
            with: [
                'customer' => $this->customer,
                'code' => $this->code,
            ],
        );
    }

    /**
     * Attachments
     */
    public function attachments(): array
    {
        return [];
    }
}