<?php

namespace App\Services;

use App\Enums\UserTypeEnum;
use App\Models\UserTypePermission;
use Illuminate\Database\Eloquent\Collection;

class UserTypePermissionService
{
    public function allGuestPermissions(): ?Collection
    {
        return UserTypePermission::where('user_type', 'guest')->get();
    }

    public function allPermissionsByUserType(
        UserTypeEnum $userType,
    ): ?Collection {
        return UserTypePermission::where('user_type', $userType->value)->get();
    }
}
