<?php
/**
 * Dokan Kits Helper Functions
 *
 * @package Dokan_Kits
 */

use DokanKits\Core\TemplateManager;
use DokanKits\Utils\Logger;

/**
 * Check if WooCommerce is active
 *
 * @return bool
 */
function dokan_kits_is_woocommerce_active(): bool {
	return class_exists( 'WooCommerce' );
}

/**
 * Get template
 *
 * @param string $template_name Template name.
 * @param array  $args          Template arguments (optional).
 *
 * @return void
 */
function dokan_kits_get_template( string $template_name, array $args = array() ) {
	dokan_kits_get_container()->get( TemplateManager::class )->get_template( $template_name, $args );
}

/**
 * Get the Logger instance
 *
 * @return Logger Logger instance.
 */
function dokan_kits_logger(): Logger {
	return dokan_kits_get_container()->get( Logger::class );
}
