<?php

namespace App\Classes\Modules\Steps;

class GroupStep
{
    /** @var string */
    protected $modularId;

    /** @var string */
    protected $previous;

    /** @var string */
    protected $next;

    /** @var array */
    protected $steps;

    /**
     * AbstractGroupStep constructor.
     * @param string $modularId
     * @param string $previous
     * @param string $next
     * @param array $steps
     */
    public function __construct(string $modularId, string $previous, string $next, array $steps)
    {
        $this->modularId = $modularId;
        $this->previous = $previous;
        $this->next = $next;
        $this->steps = $steps;
    }

    /**
     * @return string
     */
    public function getModularId(): string
    {
        return $this->modularId;
    }

    /**
     * @return string
     */
    public function getPrevious(): string
    {
        return $this->previous;
    }

    /**
     * @return string
     */
    public function getNext(): string
    {
        return $this->next;
    }

    /**
     * @return array
     */
    public function getSteps(): array
    {
        return (new GenerateSteps())->execute($this->steps);
    }

}