<?php

namespace App\Classes\Modules\Wallets\Standards\Rules;


use App\Classes\General\Abstracts\AbstractRule;
use App\Classes\Modules\Wallets\DataTransferObjects\WalletObject;
use App\Classes\Modules\Wallets\Standards\Validators\ListWalletValidation;

class CanListWallet extends AbstractRule
{

    /** @var ListWalletValidation */
    private $listWalletValidation;


    public function __construct(ListWalletValidation $listWalletValidation)
    {
        $this->listWalletValidation = $listWalletValidation;
    }


    /**
     * @return bool
     */
    protected function authorized(): bool
    {
        // TODO  Set Authorization rules
        return true;
    }

    /**
     * @param WalletObject $object
     * @return bool
     * @throws \App\Classes\Exceptions\RequestValidationException
     */
    protected function validators($object): bool
    {
        return $this->listWalletValidation->validate($object);
    }

    /**
     * @param WalletTransactionObject $object
     * @return bool
     */
    protected function criteria($object): bool
    {
        return true;
    }

}
