<?php

namespace App\Notifications;

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

class TwoFactorEnabledNotification extends Notification implements ShouldQueue
{
    use Queueable;

    /**
     * Get the notification's delivery channels.
     */
    public function via(object $notifiable): array
    {
        return ['mail'];
    }

    /**
     * Get the mail representation of the notification.
     */
    public function toMail(object $notifiable): MailMessage
    {
        return (new MailMessage)
            ->subject('Two-Factor Authentication Enabled - LifeData')
            ->greeting('Hello, ' . $notifiable->name . '!')
            ->line('Two-factor authentication has been successfully enabled for your account.')
            ->line('You will now receive a verification code via email each time you log in.')
            ->line('If you did not enable this security feature, please contact support immediately.');
    }
}
