<?php

namespace $NAMESPACE$;

use App\Models\User;
use $MODULE_NAMESPACE$\$MODULE$\Models\$STUDLY_NAME$;
use Illuminate\Auth\Access\HandlesAuthorization;

class $CLASS$
{
    use HandlesAuthorization;

    /**
     * Determine whether the user can view any models.
     */
    public function viewAny(User $user): bool
    {
        return $user->can('View $STUDLY_NAME$s');
    }

    /**
     * Determine whether the user can view the model.
     */
    public function view(User $user, $STUDLY_NAME$ $$LOWER_NAME$): bool
    {
        return $user->can('View $STUDLY_NAME$s');
    }

    /**
     * Determine whether the user can create models.
     */
    public function create(User $user): bool
    {
        return $user->can('Create $STUDLY_NAME$s');
    }

    /**
     * Determine whether the user can update the model.
     */
    public function update(User $user, $STUDLY_NAME$ $$LOWER_NAME$): bool
    {
        return $user->can('Edit $STUDLY_NAME$s');
    }

    /**
     * Determine whether the user can delete the model.
     */
    public function delete(User $user, $STUDLY_NAME$ $$LOWER_NAME$): bool
    {
        return $user->can('Delete $STUDLY_NAME$s');
    }

    /**
     * Determine whether the user can restore the model.
     */
    public function restore(User $user, $STUDLY_NAME$ $$LOWER_NAME$): bool
    {
        return $user->can('Delete $STUDLY_NAME$s');
    }

    /**
     * Determine whether the user can permanently delete the model.
     */
    public function forceDelete(User $user, $STUDLY_NAME$ $$LOWER_NAME$): bool
    {
        return $user->can('Delete $STUDLY_NAME$s');
    }

    /**
     * Determine whether the user can export models.
     */
    public function export(User $user): bool
    {
        return $user->can('Export $STUDLY_NAME$s');
    }

    /**
     * Determine whether the user can import models.
     */
    public function import(User $user): bool
    {
        return $user->can('Import $STUDLY_NAME$s');
    }
}
