<?php

namespace App\Modules\HR\Offboarding\Notifications;

use App\Modules\HR\Offboarding\Models\OffboardingCase;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;

class OffboardingSubmittedNotification extends Notification
{
    use Queueable;

    public function __construct(private readonly OffboardingCase $case) {}

    /** @return array<int, string> */
    public function via(object $notifiable): array
    {
        return ['database'];
    }

    /** @return array<string, mixed> */
    public function toArray(object $notifiable): array
    {
        return [
            'type' => 'offboarding_submitted',
            'case_id' => $this->case->id,
            'employee_id' => $this->case->employee_id,
            'message' => __('offboarding.notifications.submitted'),
            'url' => route('hr.offboarding.index'),
        ];
    }
}
