<?php

namespace App\Mail;

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

class ProjectAssignedMail extends Mailable
{
    use Queueable, SerializesModels;

    public function __construct(
        public readonly string $recipientName,
        public readonly string $projectName,
        public readonly string $projectCode,
        public readonly string $assignedRole,
        public readonly string $assignerName,
        public readonly string $appUrl,
    ) {}

    public function envelope(): Envelope
    {
        return new Envelope(subject: "You've been assigned to project: {$this->projectName}");
    }

    public function content(): Content
    {
        return new Content(view: 'emails.project-assigned');
    }
}
