<?php

namespace App\Jobs;

use App\Mail\NewTourPurchaseNotification;
use App\Models\TourPurchase;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;
use Illuminate\Support\Facades\Mail;

class SendNewTourPurchaseNotification implements ShouldQueue
{
    use Queueable;

    public function __construct(public TourPurchase $tourPurchase) {}

    public function handle(): void
    {
        Mail::to('m.f.luis@hotmail.com')
            ->cc('e.hellotours@hotmail.com')
            ->send(new NewTourPurchaseNotification($this->tourPurchase));
    }
}
