<?php

namespace CouponsPlus\App\Coupon\Tree\Abilities;

use CouponsPlus\App\Coupon\Tree\Sets\Abilities\HasItemsSetSorter;

interface NodeData
{
    /**
     * @return Branch&HasItemsSetSorter
     */
    public function getBranch() : Branch;

    /**
     * @return TestableGroupData|TestableData
     */
    public function getTestable();

    public function getParent() : ?Branch;
    public function setParent(?Branch $parent) : void;
    /*
     * For virtualized branches, this is the index # of the instance
     * eg: if a branch is virtualized to create 3 instances, the first instance will have index 0, the second 1, and the third 2.
     */
    public function setVirtualInstanceIndex(int $index) : void;
    public function getID() : string;
}