<?php
namespace Bdp\Modules\EventParticipants\Controllers;

use Bdp\Modules\EventParticipants\Models\Event;

class ListGroupsAndMembersController {
	public function __construct(?int $event_id = null) {
		if (!isset($_GET['event-id']) && null === $event_id) {
			wp_die('Invalid url given');
		}

		if (isset($_GET['event-id'])) {
			$event_id = $_GET['event-id'];
		}
		$active_tab = 'tab1';
		if (isset($_GET['tab'])) {
			$active_tab = $_GET['tab'];
		}


		$event = Event::loadById($event_id);

		$admin_link = admin_url('admin.php?page=kompass-events&action=');
		include dirname(__FILE__) . '/../Templates/Partials/admin/tab-control.php';
	}
}