<?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 OrderTrackingUpdated extends Mailable
{
    use Queueable, SerializesModels;
    public $trackingNumber;
    public $orderId;
    /**
     * Create a new message instance.
     */
    public function __construct($trackingNumber,$orderId)
    {
        $this->trackingNumber = $trackingNumber;
        $this->orderId = $orderId;
    }

    /**
     * Get the message envelope.
     */
    public function envelope(): Envelope
    {
        return new Envelope(
            subject: 'Order Tracking Updated',
        );
    }

    /**
     * Get the message content definition.
     */
    public function build()
    {
        return $this->subject('Tracking Updated American plastics web')->view('emails.order_tracking_updated', [
            'trackingNumber' => $this->trackingNumber,
            'orderid' => $this->orderId,

        ]);
    }

    /**
     * Get the attachments for the message.
     *
     * @return array<int, \Illuminate\Mail\Mailables\Attachment>
     */
    public function attachments(): array
    {
        return [];
    }
}
