<?php

namespace App\Mail;

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

class AccountRegister extends Mailable
{
    use Queueable, SerializesModels;

    public $restaurantuser;
    public $restaurantName;

    /**
     * Create a new message instance.
     *
     * @param IamPrincipal $restaurantuser
     * @param string $restaurantName
     * @return void
     */
    public function __construct(IamPrincipal $restaurantuser, $restaurantName)
    {
        $this->restaurantuser = $restaurantuser;
        $this->restaurantName = $restaurantName;
    }

    /**
     * Build the message.
     *
     * @return $this
     */


    public function build()
    {
        return $this->view('Admin.pages.mail.account_register');
    }

    /**
     * Get the message envelope.
     *
     * @return \Illuminate\Mail\Mailables\Envelope
     */
    public function envelope(): Envelope
    {
        return new Envelope(
            subject: 'New Account Registration Details',
        );
    }

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

