<?php

namespace App\Policies;

use App\Enums\UserRole;
use App\Models\User;

class BaseAdminPolicy
{
    protected function isAdmin(User $user): bool
    {
        return $user->role === UserRole::Admin || $user->role === UserRole::SuperAdmin;
    }

    protected function isContentUser(User $user): bool
    {
        return in_array($user->role, [UserRole::SuperAdmin, UserRole::Admin, UserRole::Editor], true);
    }
}
