<?php

declare(strict_types=1);

namespace App\Modules\LoanOrder\Policies;

use App\Modules\LoanOrder\Models\LoanOrder;
use Illuminate\Auth\Access\HandlesAuthorization;
use Illuminate\Foundation\Auth\User as AuthUser;

class LoanOrderPolicy
{
    use HandlesAuthorization;

    public function viewAny(AuthUser $authUser): bool
    {
        return $authUser->can('ViewAny:LoanOrder');
    }

    public function view(AuthUser $authUser, LoanOrder $loanOrder): bool
    {
        return $authUser->can('View:LoanOrder');
    }

    public function create(AuthUser $authUser): bool
    {
        return $authUser->can('Create:LoanOrder');
    }

    public function update(AuthUser $authUser, LoanOrder $loanOrder): bool
    {
        return $authUser->can('Update:LoanOrder');
    }

    public function delete(AuthUser $authUser, LoanOrder $loanOrder): bool
    {
        return $authUser->can('Delete:LoanOrder');
    }

    public function restore(AuthUser $authUser, LoanOrder $loanOrder): bool
    {
        return $authUser->can('Restore:LoanOrder');
    }

    public function forceDelete(AuthUser $authUser, LoanOrder $loanOrder): bool
    {
        return $authUser->can('ForceDelete:LoanOrder');
    }

    public function forceDeleteAny(AuthUser $authUser): bool
    {
        return $authUser->can('ForceDeleteAny:LoanOrder');
    }

    public function restoreAny(AuthUser $authUser): bool
    {
        return $authUser->can('RestoreAny:LoanOrder');
    }

    public function replicate(AuthUser $authUser, LoanOrder $loanOrder): bool
    {
        return $authUser->can('Replicate:LoanOrder');
    }

    public function reorder(AuthUser $authUser): bool
    {
        return $authUser->can('Reorder:LoanOrder');
    }
}
