<?php

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

use App\Classes\General\Abstracts\AbstractRule;
use App\Classes\Modules\Steps\Standards\Validators\CreateStepValidation;

class CanCreateStep extends AbstractRule
{
    private $orderValidation;

    public function __construct(CreateStepValidation $orderValidation)
    {
        $this->orderValidation = $orderValidation;
    }

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

    protected function validators($object): bool
    {
        return $this->orderValidation->validate($object);
    }

    /**
     * @param CompanyObject $object
     * @return bool
     */
    protected function criteria($object): bool
    {
        //Verify account?
        //Contract created on Unity
        return true;
    }
}