<?php
/**
 * AI Tutor functions and definitions
 *
 * @package AI Tutor
 */

function ai_tutor_enqueue_scripts() {

	wp_enqueue_style( 'ai-tutor-style-parent', get_template_directory_uri() . '/style.css' );

	wp_enqueue_style( 'ai-tutor-basic-style', get_stylesheet_uri() );

    wp_enqueue_script('ai-tutor-main-script', get_theme_file_uri() . '/js/script.js', array('jquery'), true);
}
add_action( 'wp_enqueue_scripts', 'ai_tutor_enqueue_scripts' );

add_action( 'init', 'ai_tutor_remove_action');
function ai_tutor_remove_action() {
    remove_action( 'admin_menu','school_classroom_add_admin_menu' );
    remove_action( 'admin_notices','school_classroom_admin_notice' );
}

add_action( 'after_setup_theme', 'ai_tutor_remove_function', 999 );
function ai_tutor_remove_function() {
    remove_action( 'init', 'school_classroom_run' );
    remove_action( 'init', 'school_classroom_main_getstart_function' );
    remove_action( 'init', array( 'SCHOOL_CLASSROOM_Customize', 'get_instance' ) );
}


/**
 * Enqueue admin scripts and styles.
 */
function ai_tutor_admin_scripts() {

    wp_enqueue_style(
        'ai-tutor-admin-css',
        get_theme_file_uri() . '/notice-getstart/theme-info.css',
        [],
        wp_get_theme()->get( 'Version' )
    );

    // Enqueue JS
    wp_enqueue_script(
        'ai-tutor-admin-js',
        get_theme_file_uri() . '/notice-getstart/theme-info.js',
        [],
        wp_get_theme()->get( 'Version' ),
        true // Load in footer
    );

}
add_action( 'admin_enqueue_scripts', 'ai_tutor_admin_scripts' );

/** 
 * Customizer
 */
require get_theme_file_path() . '/core/section-pro/customizer.php';


/**
 * Current theme path.
 * Current theme url.
 * Current theme version.
 * Current theme name.
 * Current theme option name.
 */
define( 'AI_TUTOR_PATH', trailingslashit( get_theme_file_path() ) );
define( 'AI_TUTOR_URL', trailingslashit( get_theme_file_uri() ) );
define( 'AI_TUTOR_VERSION', '1.0.0' );
define( 'AI_TUTOR_THEME_NAME', 'ai-tutor' );
define( 'AI_TUTOR_OPTION_NAME', 'ai-tutor' );

/**
 * The core theme class that is used to define internationalization,
 * admin-specific hooks, and public-facing site hooks.
 */
require AI_TUTOR_PATH . 'notice-getstart/main.php';

/**
 * Begins execution of the theme.
 *
 * @since    1.0.0
 */
function ai_tutor_run() {
    new ai_tutor();
}
ai_tutor_run();