<?php

namespace Modules\Patient\Policies;

use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
use Modules\Patient\Models\Patient;

class PatientPolicy
{
    use HandlesAuthorization;

    public function viewAny(User $authUser): bool
    {
        return $authUser->can('patient.patient.view');
    }

    public function view(User $authUser, Patient $patient): bool
    {
        return $authUser->can('patient.patient.view');
    }

    public function create(User $authUser): bool
    {
        return $authUser->can('patient.patient.create');
    }

    public function update(User $authUser, Patient $patient): bool
    {
        return $authUser->can('patient.patient.update');
    }

    public function updateStatus(User $authUser, Patient $patient): bool
    {
        return $authUser->can('patient.patient.status');
    }

    public function delete(User $authUser, Patient $patient): bool
    {
        return $authUser->can('patient.patient.delete');
    }
}
