<?php
/**
 * Evento Corp Admin Class.
 *
 * @package Evento Corp
 * @since   1.0.0
 */
if (!defined('ABSPATH')) {
    exit;
}
if (!class_exists('Evento_Corp_Admin')) :
    /**
     * Evento_Corp_Admin Class.
     */
    class Evento_Corp_Admin
    {
        /**
         * Constructor.
         */
        public function __construct()
        {
            add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'));
        }

        /**
         * Localize array for import button AJAX request.
         */
        public function enqueue_scripts()
        {
            wp_enqueue_style(
                'evento-corp-admin-style',
                get_template_directory_uri() . '/inc/dashboard/css/admin.css',
                array(),
                EVENTO_CORP_VERSION
            );

            wp_enqueue_script('evento-corp-plugin-install-helper', get_template_directory_uri() . '/inc/dashboard/js/admin.js', array('jquery'), EVENTO_CORP_VERSION);
            $evento_corp_welcome_data = array(
                'uri' => esc_url(admin_url('/themes.php?page=evento-corp&tab=starter-templates')),
                'btn_text' => esc_html__('Processing...', 'evento-corp'),
                'nonce' => wp_create_nonce('evento_corp_demo_import_nonce'),
                'admin_url' => esc_url(admin_url()),
                'ajaxurl' => admin_url('admin-ajax.php'), // Include this line for using admin-ajax.php
            );
            wp_localize_script('evento-corp-plugin-install-helper', 'eventocorpRedirectDemoPage', $evento_corp_welcome_data);
        }

        
    }
endif;
return new Evento_Corp_Admin();
