<?php

namespace Planaday\Config\OptionTypes;

/**
 * @template TDefault
 * @extends IntOption<TDefault>
 */
class PageOption extends IntOption {
	/** @var string|null */
	protected $shortcode;

	/**
	 * @param string $index
	 * @param string $title
	 * @param string $description
	 * @param null|int $value
	 * @param TDefault $defaultValue
	 * @param string|null $shortcode
	 */
	public function __construct( string $index, string $title, string $description, ?int $value, $defaultValue, ?string $shortcode = null) {
		$this->shortcode = $shortcode;
		parent::__construct( $index, $title, $description, $value, $defaultValue );
	}

	function getType(): string {
		return 'page';
	}

	function getShortcode(): ?string {
		return $this->shortcode;
	}
}