<?php
/**
 * Setup Class
 *
 * @package errigal
 * @since 1.1.0
 */

namespace Errigal\Setup;

defined( 'ABSPATH' ) || exit;

require get_template_directory() . '/inc/autoload/class-errigal-autoload.php';

use Errigal\Customiser\Errigal_Customiser as Customiser;
use Errigal\Hook\Errigal_Hooks as Hooks;
use Errigal\Navigation\Errigal_Main_Menu as Main_Menu;
use Errigal\Sidebar\Errigal_Sidebar as Sidebar;

/**
 * This class is in charge of theme setup.
 *
 * @since 1.1.0
 */
class Errigal_Setup extends Errigal_Setup_Base {
	/**
	 * Initialises theme.
	 *
	 * @since 1.1.0
	 *
	 * @return void
	 */
	protected function initialise() {
		new Main_Menu();
		new Sidebar();
		new Hooks();

		if ( is_customize_preview() ) {
			new Customiser();
		}
	}
}

new Errigal_Setup();
