<?php
/**
 * Zentorone functions and definitions
 *
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 *
 * @package Zentorone
 */

if ( ! defined( 'ZENTORONE_VERSION' ) ) {
	define( 'ZENTORONE_VERSION', '1.0.4' );
}

/**
 * Table of Contents:
 *
 * 1. Theme Setup
 * 2. Performance & Assets
 * 3. Customizer
 * 4. WooCommerce
 * 5. Template Tags & Functions
 */

// 1. Template Tags & Functions (Dependencies for other classes)
require get_template_directory() . '/inc/template-tags.php';
require get_template_directory() . '/inc/template-functions.php';
require get_template_directory() . '/inc/class-zentorone-nav-walker.php';

// 2. Theme Setup
require get_template_directory() . '/inc/class-zentorone-setup.php';

// 3. Performance & Assets
require get_template_directory() . '/inc/class-zentorone-performance.php';

// 4. Customizer
require get_template_directory() . '/inc/class-zentorone-customizer.php';

// 5. WooCommerce
if ( class_exists( 'WooCommerce' ) ) {
	require get_template_directory() . '/inc/class-zentorone-woocommerce.php';
}

// Initialize the setup class
function zentorone_run_setup() {
    $setup = new Zentorone_Setup();
    $setup->run();
}
// Hooking into 'after_setup_theme' is handled inside the class, but we need to instantiate it.
// Actually, it's cleaner to instantiate directly or have a static init(). 
// Let's stick to simple instantiation here immediately if the class handles its own hooks in __construct or run.
new Zentorone_Setup();

// Initialize Performance
new Zentorone_Performance();

// Initialize Customizer
new Zentorone_Customizer();

// Initialize WooCommerce
if ( class_exists( 'WooCommerce' ) ) {
	new Zentorone_WooCommerce();
}
