<?php

declare(strict_types=1);

namespace App\Policies;

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

class IssueManagementPolicy
{
    use HandlesAuthorization;

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

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

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

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

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

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

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

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

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

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

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