<?php

declare(strict_types=1);

namespace App\Notifications\Auth;

use Illuminate\Auth\Notifications\VerifyEmail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;

class VerifyEmailNotification extends VerifyEmail implements ShouldQueue
{
    use Queueable;

    protected function buildMailMessage($url): MailMessage
    {
        $appName = config('app.name');

        return (new MailMessage)
            ->subject(__('Action Required: Secure Account Verification for :app', ['app' => $appName]))
            ->greeting(__('Dear Valued Client,', ['app' => $appName]))
            ->line(__('Thank you for registering with :app. To officially finalize your registration and ensure the security of your account, we kindly request that you authenticate your email address.', ['app' => $appName]))
            ->action(__('Authenticate Account'), $url)
            ->line(__('Please note that this secure verification link will expire in 60 minutes. Should this request be made in error, or if you did not authorize the creation of this account, please disregard this communication.'))
            ->salutation(__('Sincerely,')."\n**".$appName." Identity Management**");
    }
}
