<?php

namespace App\Notifications\Push\Cliente\Marketing;

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

class Marketing2Push extends BasePushNotification
{
    public function label(): string
    {
        return 'cliente_marketing_2';
    }

    public function title(): string
    {
        return 'Precisando de ajuda hoje?';
    }

    public function body(): string
    {
        return 'Veja diaristas disponíveis perto de você.';
    }

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

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

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