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

namespace Errigal\Autoload;

defined( 'ABSPATH' ) || exit;

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

/**
 * This class is in charge of autoloading.
 *
 * @since 1.1.0
 */
class Errigal_Autoload extends Errigal_Autoload_Base {
	/**
	 * Gets root namespace.
	 *
	 * @since 1.1.0
	 *
	 * @return string
	 */
	protected function get_root_namespace() {
		return 'Errigal';
	}

	/**
	 * Gets root path for theme.
	 *
	 * @since 1.1.0
	 *
	 * @return string
	 */
	protected function get_root_path() {
		return get_template_directory();
	}

	/**
	 * Gets class map.
	 *
	 * @since 1.1.0
	 *
	 * @return array
	 */
	protected function get_class_map() {
		return array(
			// Admin.
			'Errigal\\Admin\\Errigal_Admin'                => 'admin/class-errigal-admin.php',
			'Errigal\\Admin\\Errigal_Documentation'        => 'admin/class-errigal-documentation.php',
			'Errigal\\Admin\\Errigal_Notice_Item'          => 'admin/class-errigal-notice-item.php',
			'Errigal\\Admin\\Errigal_Notice'               => 'admin/class-errigal-notice.php',
			// Constant.
			'Errigal\\Constant\\Errigal_Accessibility_Class' => 'constant/class-errigal-accessibility-class.php',
			'Errigal\\Constant\\Errigal_Admin_Class'       => 'constant/class-errigal-admin-class.php',
			'Errigal\\Constant\\Errigal_Admin_Hook'        => 'constant/class-errigal-admin-hook.php',
			'Errigal\\Constant\\Errigal_Asset_Hook'        => 'constant/class-errigal-asset-hook.php',
			'Errigal\\Constant\\Errigal_Component_Class'   => 'constant/class-errigal-component-class.php',
			'Errigal\\Constant\\Errigal_Content_Class'     => 'constant/class-errigal-content-class.php',
			'Errigal\\Constant\\Errigal_Content_Hook'      => 'constant/class-errigal-content-hook.php',
			'Errigal\\Constant\\Errigal_Custom_Colour_Scheme_Hook' => 'constant/class-errigal-custom-colour-scheme-hook.php',
			'Errigal\\Constant\\Errigal_Custom_Heading_Style_Hook' => 'constant/class-errigal-custom-heading-style-hook.php',
			'Errigal\\Constant\\Errigal_Custom_Section'    => 'constant/class-errigal-custom-section.php',
			'Errigal\\Constant\\Errigal_Custom_Typography_Hook' => 'constant/class-errigal-custom-typography-hook.php',
			'Errigal\\Constant\\Errigal_Customiser_Hook'   => 'constant/class-errigal-customiser-hook.php',
			'Errigal\\Constant\\Errigal_Customiser_Object' => 'constant/class-errigal-customiser-object.php',
			'Errigal\\Constant\\Errigal_Customiser_Panel'  => 'constant/class-errigal-customiser-panel.php',
			'Errigal\\Constant\\Errigal_Documentation_Hook' => 'constant/class-errigal-documentation-hook.php',
			'Errigal\\Constant\\Errigal_Documentation_Relative_Url' => 'constant/class-errigal-documentation-relative-url.php',
			'Errigal\\Constant\\Errigal_Editor_Class'      => 'constant/class-errigal-editor-class.php',
			'Errigal\\Constant\\Errigal_Footer_Class'      => 'constant/class-errigal-footer-class.php',
			'Errigal\\Constant\\Errigal_Footer_Hook'       => 'constant/class-errigal-footer-hook.php',
			'Errigal\\Constant\\Errigal_Header_Class'      => 'constant/class-errigal-header-class.php',
			'Errigal\\Constant\\Errigal_Header_Hook'       => 'constant/class-errigal-header-hook.php',
			'Errigal\\Constant\\Errigal_Hook_Interface'    => 'constant/errigal-hook-interface.php',
			'Errigal\\Constant\\Errigal_Html_Attr'         => 'constant/class-errigal-html-attr.php',
			'Errigal\\Constant\\Errigal_Html_Element_Hook' => 'constant/class-errigal-html-element-hook.php',
			'Errigal\\Constant\\Errigal_Html_Option'       => 'constant/class-errigal-html-option.php',
			'Errigal\\Constant\\Errigal_Html_Schema_Hook'  => 'constant/class-errigal-html-schema-hook.php',
			'Errigal\\Constant\\Errigal_Html_Tag'          => 'constant/class-errigal-html-tag.php',
			'Errigal\\Constant\\Errigal_Locale'            => 'constant/class-errigal-locale.php',
			'Errigal\\Constant\\Errigal_Navigation_Class'  => 'constant/class-errigal-navigation-class.php',
			'Errigal\\Constant\\Errigal_Navigation_Hook'   => 'constant/class-errigal-navigation-hook.php',
			'Errigal\\Constant\\Errigal_Navigation_Id'     => 'constant/class-errigal-navigation-id.php',
			'Errigal\\Constant\\Errigal_Setup_Hook'        => 'constant/class-errigal-setup-hook.php',
			'Errigal\\Constant\\Errigal_Shared_Class'      => 'constant/class-errigal-shared-class.php',
			'Errigal\\Constant\\Errigal_Shared_Selector'   => 'constant/class-errigal-shared-selector.php',
			'Errigal\\Constant\\Errigal_Sidebar_Class'     => 'constant/class-errigal-sidebar-class.php',
			'Errigal\\Constant\\Errigal_Sidebar_Hook'      => 'constant/class-errigal-sidebar-hook.php',
			'Errigal\\Constant\\Errigal_Social_Hook'       => 'constant/class-errigal-social-hook.php',
			'Errigal\\Constant\\Errigal_Template_Part'     => 'constant/class-errigal-template-part.php',
			'Errigal\\Constant\\Errigal_Utility_Hook'      => 'constant/class-errigal-utility-hook.php',
			'Errigal\\Constant\\Errigal_WP_Class'          => 'constant/class-errigal-wp-class.php',
			'Errigal\\Constant\\Errigal_WP_Function'       => 'constant/class-errigal-wp-function.php',
			'Errigal\\Constant\\Errigal_WP_Global'         => 'constant/class-errigal-wp-global.php',
			'Errigal\\Constant\\Errigal_WP_Hook'           => 'constant/class-errigal-wp-hook.php',
			'Errigal\\Constant\\Errigal_WP_Page'           => 'constant/class-errigal-wp-page.php',
			// Content.
			'Errigal\\Content\\Errigal_Content'            => 'content/class-errigal-content.php',
			// Customiser.
			'Errigal\\Customiser\\Errigal_Custom_Background_Colour_Option' => 'customiser/class-errigal-custom-background-colour-option.php',
			'Errigal\\Customiser\\Errigal_Custom_Base'     => 'customiser/class-errigal-custom-base.php',
			'Errigal\\Customiser\\Errigal_Custom_Breadcrumb_Option' => 'customiser/class-errigal-custom-breadcrumb-option.php',
			'Errigal\\Customiser\\Errigal_Custom_Breadcrumb' => 'customiser/class-errigal-custom-breadcrumb.php',
			'Errigal\\Customiser\\Errigal_Custom_Colour_Scheme_Option' => 'customiser/class-errigal-custom-colour-scheme-option.php',
			'Errigal\\Customiser\\Errigal_Custom_Colour_Scheme' => 'customiser/class-errigal-custom-colour-scheme.php',
			'Errigal\\Customiser\\Errigal_Custom_Footer_Option' => 'customiser/class-errigal-custom-footer-option.php',
			'Errigal\\Customiser\\Errigal_Custom_Footer'   => 'customiser/class-errigal-custom-footer.php',
			'Errigal\\Customiser\\Errigal_Custom_Heading_Style_Option' => 'customiser/class-errigal-custom-heading-style-option.php',
			'Errigal\\Customiser\\Errigal_Custom_Heading_Style' => 'customiser/class-errigal-custom-heading-style.php',
			'Errigal\\Customiser\\Errigal_Custom_Option_Base' => 'customiser/class-errigal-custom-option-base.php',
			'Errigal\\Customiser\\Errigal_Custom_Post_Author_Option' => 'customiser/class-errigal-custom-post-author-option.php',
			'Errigal\\Customiser\\Errigal_Custom_Post_Author' => 'customiser/class-errigal-custom-post-author.php',
			'Errigal\\Customiser\\Errigal_Custom_Pro_Features_Option' => 'customiser/class-errigal-custom-pro-features-option.php',
			'Errigal\\Customiser\\Errigal_Custom_Site_Header_Colour_Option' => 'customiser/class-errigal-custom-site-header-colour-option.php',
			'Errigal\\Customiser\\Errigal_Custom_Site_Header_Colour' => 'customiser/class-errigal-custom-site-header-colour.php',
			'Errigal\\Customiser\\Errigal_Custom_Site_Identity_Option' => 'customiser/class-errigal-custom-site-identity-option.php',
			'Errigal\\Customiser\\Errigal_Custom_Site_Identity' => 'customiser/class-errigal-custom-site-identity.php',
			'Errigal\\Customiser\\Errigal_Custom_Typography_Option' => 'customiser/class-errigal-custom-typography-option.php',
			'Errigal\\Customiser\\Errigal_Custom_Typography' => 'customiser/class-errigal-custom-typography.php',
			'Errigal\\Customiser\\Errigal_Customise_Control_Label' => 'customiser/class-errigal-customise-control-label.php',
			'Errigal\\Customiser\\Errigal_Customise_Control_Pro_Features' => 'customiser/class-errigal-customise-control-pro-features.php',
			'Errigal\\Customiser\\Errigal_Customiser_Base' => 'customiser/class-errigal-customiser-base.php',
			'Errigal\\Customiser\\Errigal_Customiser'      => 'customiser/class-errigal-customiser.php',
			// Header.
			'Errigal\\Header\\Errigal_Header'              => 'header/class-errigal-header.php',
			// Hook.
			'Errigal\\Hook\\Errigal_Admin_Hooks'           => 'hook/class-errigal-admin-hooks.php',
			'Errigal\\Hook\\Errigal_Asset_Hooks'           => 'hook/class-errigal-asset-hooks.php',
			'Errigal\\Hook\\Errigal_Comment_Hooks'         => 'hook/class-errigal-comment-hooks.php',
			'Errigal\\Hook\\Errigal_Content_Hooks'         => 'hook/class-errigal-content-hooks.php',
			'Errigal\\Hook\\Errigal_Customiser_Hooks'      => 'hook/class-errigal-customiser-hooks.php',
			'Errigal\\Hook\\Errigal_Editor_Hooks'          => 'hook/class-errigal-editor-hooks.php',
			'Errigal\\Hook\\Errigal_Header_Hooks'          => 'hook/class-errigal-header-hooks.php',
			'Errigal\\Hook\\Errigal_Hooks_Base'            => 'hook/class-errigal-hooks-base.php',
			'Errigal\\Hook\\Errigal_Hooks'                 => 'hook/class-errigal-hooks.php',
			'Errigal\\Hook\\Errigal_Navigation_Hooks'      => 'hook/class-errigal-navigation-hooks.php',
			'Errigal\\Hook\\Errigal_Setup_Hooks'           => 'hook/class-errigal-setup-hooks.php',
			'Errigal\\Hook\\Errigal_Sidebar_Hooks'         => 'hook/class-errigal-sidebar-hooks.php',
			// Icon.
			'Errigal\\Icon\\Errigal_Icon'                  => 'icon/class-errigal-icon.php',
			// Navigation.
			'Errigal\\Navigation\\Errigal_Main_Menu'       => 'navigation/class-errigal-main-menu.php',
			'Errigal\\Navigation\\Errigal_Menu_Base'       => 'navigation/class-errigal-menu-base.php',
			'Errigal\\Navigation\\Errigal_Navigation'      => 'navigation/class-errigal-navigation.php',
			// Search.
			'Errigal\\Search\\Errigal_Search_Form'         => 'search/class-errigal-search-form.php',
			// Setup.
			'Errigal\\Setup\\Errigal_Setup_Base'           => 'setup/class-errigal-setup-base.php',
			// Shared.
			'Errigal\\Shared\\Errigal_Asset'               => 'shared/class-errigal-asset.php',
			'Errigal\\Shared\\Errigal_Html_Builder_Base'   => 'shared/class-errigal-html-builder-base.php',
			'Errigal\\Shared\\Errigal_Html_Builder'        => 'shared/class-errigal-html-builder.php',
			'Errigal\\Shared\\Errigal_Html_Element'        => 'shared/class-errigal-html-element.php',
			'Errigal\\Shared\\Errigal_Html_Html_Element'   => 'shared/class-errigal-html-html-element.php',
			'Errigal\\Shared\\Errigal_Html_Schema'         => 'shared/class-errigal-html-schema.php',
			'Errigal\\Shared\\Errigal_Query'               => 'shared/class-errigal-query.php',
			'Errigal\\Shared\\Errigal_Site_Info'           => 'shared/class-errigal-site-info.php',
			'Errigal\\Shared\\Errigal_Theme_Info'          => 'shared/class-errigal-theme-info.php',
			'Errigal\\Shared\\Errigal_Utility_Dom'         => 'shared/class-errigal-utility-dom.php',
			// Sidebar.
			'Errigal\\Sidebar\\Errigal_Sidebar_Base'       => 'sidebar/class-errigal-sidebar-base.php',
			'Errigal\\Sidebar\\Errigal_Sidebar'            => 'sidebar/class-errigal-sidebar.php',
			// Social.
			'Errigal\\Social\\Errigal_Social_Link'         => 'social/class-errigal-social-link.php',
			// Widgets.
			'Errigal\\Widget\\Errigal_Profile_Widget'      => 'widget/class-errigal-profile-widget.php',
			'Errigal\\Widget\\Errigal_Widget_Base'         => 'widget/class-errigal-widget-base.php',
			// Classes not autoloaded.
			'Errigal\\Autoload\\Errigal_Autoload_Base'     => 'autoload/class-errigal-autoload-base.php',
			'Errigal\\Autoload\\Errigal_Autoload'          => 'autoload/class-errigal-autoload.php',
			'Errigal\\Legacy\\Errigal_Deprecated_Strings'  => 'legacy/class-errigal-deprecated-strings.php',
			'Errigal\\Setup\\Errigal_Setup'                => 'setup/class-errigal-setup.php',
			'Errigal\\Shared\\Errigal_Utility'             => 'shared/class-errigal-utility.php',
			'Errigal\\Shared\\Errigal_Validator'           => 'shared/class-errigal-validator.php',
		);
	}
}

new Errigal_Autoload();
