<?php

namespace App\Modules\HR\Leave\Policies;

use App\Models\User;
use App\Modules\HR\Leave\Models\LeaveType;

class LeaveTypePolicy
{
    public function viewAny(User $user): bool
    {
        return $user->can('leave_types.view');
    }

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

    public function update(User $user, LeaveType $type): bool
    {
        return $user->can('leave_types.update');
    }

    public function deactivate(User $user, LeaveType $type): bool
    {
        return $user->can('leave_types.deactivate');
    }
}
