<?php
/**
 * Sifency Post Type Frontend Template Render Init
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

// Base directory for admin module
$base = trailingslashit( SIFENCY_ADDONS_DIR . 'classes/admin-module' );

/**
 * Files to load
 */
$files = [
	'admin-dashboard/admin-forms.php',
	'plugins/class-plugin.php',
	'admin-options/class-admin-options.php',
	'widgets/class-widgets.php',
	'widgets/class-admin.php',
	'system/class-system.php',
	'admin-documentation/class-documentation.php',
	'admin-analytics/class-analytics.php',
	'admin-features/class-widget-duplication.php',
	'uninstall/class-sifency-deactivation-feedback.php',
];

/**
 * Require files safely
 */
foreach ( $files as $file ) {
	$path = $base . $file;
	if ( file_exists( $path ) ) {
		require_once $path;
	}
}

// Instantiate admin options for AJAX handlers
if ( class_exists( 'Sifency_Addons_Admin_Options' ) ) {
	Sifency_Addons_Admin_Options::instance();
}
