<?php

namespace App\Policies;

use App\Models\Service;
use App\Models\User;

class ServicePolicy extends BaseAdminPolicy
{
    public function viewAny(User $user): bool { return $this->isContentUser($user); }
    public function view(User $user, Service $service): bool { return $this->isContentUser($user); }
    public function create(User $user): bool { return $this->isContentUser($user); }
    public function update(User $user, Service $service): bool { return $this->isContentUser($user); }
    public function publish(User $user, Service $service): bool { return $this->isAdmin($user); }
    public function delete(User $user, Service $service): bool { return $this->isAdmin($user); }
    public function restore(User $user, Service $service): bool { return $this->isAdmin($user); }
    public function forceDelete(User $user, Service $service): bool { return $user->isSuperAdmin(); }
}
