<?php

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

use App\Classes\General\Abstracts\AbstractRule;
use App\Classes\Modules\Segments\DataTransferObjects\SegmentObject;
use Illuminate\Support\Facades\Auth;

class CanDeleteSegment extends AbstractRule
{
    /**
     * @return bool
     */
    protected function authorized($object): bool
    {
        // TODO  Set Authorization rules

        if (!Auth::user()->can('delete segment')) {
            return false;
        }

        return true;

    }

    /**
     * @param SegmentObject $object
     * @return bool
     */
    protected function validators($object): bool
    {
        return true;

    }


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

}