<?php

namespace App\Policies;

use App\Models\AdmissionApplication;
use App\Models\User;
use App\Policies\Concerns\HandlesBranchPolicy;

class AdmissionApplicationPolicy
{
    use HandlesBranchPolicy;

    public function viewAny(User $user): bool
    {
        return $this->allows($user, 'admissions.view');
    }

    public function view(User $user, AdmissionApplication $application): bool
    {
        return $this->allows($user, 'admissions.view', $application);
    }

    public function create(User $user): bool
    {
        return $this->allows($user, 'admissions.create');
    }

    public function update(User $user, AdmissionApplication $application): bool
    {
        return $this->allows($user, 'admissions.update', $application);
    }

    public function delete(User $user, AdmissionApplication $application): bool
    {
        return $this->allows($user, 'admissions.delete', $application);
    }
}
