<?php

namespace Planaday\Platform\WordpressConfig\Widgets;

use Planaday\Html\NodeTags\Booking\Shortcode\Shortcode as BookingShortcode;
use Planaday\Html\NodeTags\Course\Search\Search as CourseSearch;
use Planaday\Html\NodeTags\Course\ListShortcode\ListShortcode as CourseList;
use Planaday\Html\NodeTags\Course\Details\Shortcode\Shortcode as CourseDetails;
use Planaday\Html\NodeTags\Feature;

enum WPWidgets: string {
	case CourseList = 'course-list';
	case CourseSearch = 'course-search';
	case CourseDetails = 'course-details';
	case BookingForm = 'booking-form';

	/**
	 * @return class-string<Feature>
	 */
	function getClass(): string {
		return match ($this) {
			self::CourseList => CourseList::class,
			self::CourseSearch => CourseSearch::class,
			self::CourseDetails => CourseDetails::class,
			self::BookingForm => BookingShortcode::class,
		};
	}

	function getTitle(): string {
		return match ($this) {
			self::CourseList => 'Cursus Lijst',
			self::CourseSearch => 'Cursus Zoekformulier',
			self::CourseDetails => 'Cursus Details',
			self::BookingForm => 'Boekingsformulier',
		};
	}

	function getDescription(): string {
		return match ($this) {
			self::CourseList => 'Toon een lijst van cursussen',
			self::CourseSearch => 'Toon een zoekformulier voor cursussen',
			self::CourseDetails => 'Toon details van een cursus',
			self::BookingForm => 'Toon een boekingsformulier',
		};
	}
}
