<?php

namespace Planaday\Utility\FormBuilder\Structures;

use Planaday\Utility\FormBuilder\Structure;

class QuestionCluster implements Structure {
	use BasicStructure;

	protected ?string $index = null;
	protected string $name = '';
	protected string $description = '';

	public function setIndex( ?string $index ): self {
		$this->index = $index;
		return $this;
	}

	public function getIndex(): ?string {
		return $this->index;
	}

	public function setName(string $name): self {
		$this->name = $name;
		return $this;
	}

	public function setDescription(string $description): self {
		$this->description = $description;
		return $this;
	}

	public function getImplJson(): array {
		return [
			"type" => 'questionCluster',
			"name"  => $this->name,
			"description" => $this->description
		];
	}

}