<?php

namespace App\Notifications\Push\Prestador\Motivacional;

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

class Motivacional1Push extends BasePushNotification
{
    public function label(): string
    {
        return 'provider_motivacional_1';
    }

    public function title(): string
    {
        return 'Fique de olho 👀';
    }

    public function body(): string
    {
        return 'Novos pedidos Sob Medida surgem o tempo todo no app.';
    }

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

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

    public function notificationCooldownDays(): int
    {
        return 7;
    }

    public function categoryCooldownDays(): int
    {
        return 7;
    }

    public function eligibleUsers(): Collection
    {
        return User::whereHas('provider', fn ($q) => $q->where('approval_status', ApprovalStatusEnum::ACCEPTED))
            ->get();
    }
}
