<?php

namespace App\Notifications\Push\Cliente\Educativo;

use App\Enums\PushNotificationCategoryEnum;
use App\Enums\PushNotificationTargetEnum;
use App\Models\User;
use App\Notifications\Push\BasePushNotification;
use Illuminate\Database\Eloquent\Collection;

class Educativo1Push extends BasePushNotification
{
    public function label(): string
    {
        return 'cliente_educativo_1';
    }

    public function title(): string
    {
        return 'Você sabia?';
    }

    public function body(): string
    {
        return 'No Diária, o pagamento só é liberado após o serviço concluído.';
    }

    public function target(): PushNotificationTargetEnum
    {
        return PushNotificationTargetEnum::CLIENTE;
    }

    public function category(): PushNotificationCategoryEnum
    {
        return PushNotificationCategoryEnum::EDUCATIVO;
    }

    public function eligibleUsers(): Collection
    {
        return User::whereHas('client')
            ->where('registration_complete', true)
            ->get();
    }
}
