<?php
/**
 * Eronex theme bootstrap and file includes.
 *
 * @package Eronex
 * @since   0.0.1
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Theme version.
 *
 * @since 0.0.1
 * @var string
 */
define( 'ERONEX_VERSION', '0.0.2' );

/**
 * Absolute path to the theme directory, with trailing slash.
 *
 * @since 0.0.1
 * @var string
 */
define( 'ERONEX_DIR', trailingslashit( get_template_directory() ) );

/**
 * URL to the theme directory, with trailing slash.
 *
 * @since 0.0.1
 * @var string
 */
define( 'ERONEX_URI', trailingslashit( get_template_directory_uri() ) );

/**
 * Relative paths of theme files to load.
 *
 * @since 0.0.1
 * @var string[]
 */
$files_include = array(

	//Classes
	'classes/class-theme-setup.php',    // Theme Setup
	'classes/class-enqueues.php',       // Enqueues
	'classes/class-nav-walker.php',     // Nav Walker

	//Compatibility
	'classes/compatibility/class-elementor.php',
	'classes/compatibility/class-uae-hf.php',
	'classes/compatibility/class-xpro.php',

	//Includes
	'includes/helper-functions.php',   // Helper Functions
	'includes/theme-hooks.php',        // Theme Custom Hooks
);

/**
 * Load Kirki and customizer config when Kirki is not already available.
 *
 * @since 0.0.1
 */
if ( ! class_exists( 'Kirki' ) ) {
	$files_include[] = 'vendor/kirki/kirki.php';         // Include Kirki Customizer
	$files_include[] = 'includes/customizer/config.php';    // Customization Options
}

// Include files.
foreach ( $files_include as $file ) {
	require_once ERONEX_DIR . $file;
}
