<?php

declare(strict_types=1);

namespace App\Policies;

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

class DataChangeRequestPolicy
{
    use HandlesAuthorization;

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

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

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

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

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

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

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

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

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

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

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