<?php

/**
 * Core functionality for the kubelio theme
 *
 * This file serves as the main entry point for the theme's core functionality.
 *
 * @package Kubelio\Inc
 * @since 1.0.0
 */

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

/**
 * Load Autoloader
 */
require_once __DIR__ . '/autoload.php';

/**
 * Load Helper Functions (Procedural)
 */
require_once __DIR__ . '/function-helper.php';
require_once __DIR__ . '/template-tag.php';
require_once __DIR__ . '/template-parts.php';

// Core Modules
new \Kubelio\Core\Setup();
new \Kubelio\Core\Scripts();
new \Kubelio\Core\Block();
new \Kubelio\Core\Menu();
new \Kubelio\Core\Post();
new \Kubelio\Core\Currency();

// Admin Modules
new \Kubelio\Admin\Setup();
new \Kubelio\Admin\Notice();

if (class_exists('Kirki')) {
	new \Kubelio\Customizer\Setup();
	new \Kubelio\Customizer\Typography();
	new \Kubelio\Customizer\Color();
	new \Kubelio\Customizer\General();
	new \Kubelio\Customizer\Currency();
	new \Kubelio\Customizer\Brand();
	new \Kubelio\Customizer\Header();
	new \Kubelio\Customizer\Footer();
	new \Kubelio\Customizer\Post();
	new \Kubelio\Customizer\Connect();
	new \Kubelio\WooCommerce\Checkout();
	new \Kubelio\Customizer\WooCommerce();
	new \Kubelio\Customizer\Fallback();
}

// WooCommerce Modules
if (class_exists('WooCommerce')) {
	new \Kubelio\WooCommerce\Setup();
	new \Kubelio\WooCommerce\Scripts();
	new \Kubelio\WooCommerce\Mini_Cart();
	new \Kubelio\WooCommerce\Shop();
	new \Kubelio\WooCommerce\Product();
}
