<?php 

/**
 * Enqueue scripts and styles.
 */
function edify_scripts() {
	
	// Add CSS Files
	wp_enqueue_style( 'edify-fonts', edify_fonts_url(), array(), EDIFY_VERSION );
	

    if( is_rtl() ){
        wp_enqueue_style( 'bootstrap-rtl', EDIFY_PLUGINS.'/bootstrap/bootstrap.rtl.min.css', array() );
    }else{
        wp_enqueue_style( 'bootstrap', EDIFY_PLUGINS.'/bootstrap/bootstrap.css', array() );
    }

	wp_enqueue_style('remixicon' , EDIFY_PLUGINS. '/remixicon/remixicon.css');	
	wp_enqueue_style('fontawesome' , EDIFY_PLUGINS. '/fontawesome/css/all.css');	
	wp_enqueue_style('nice-select' , EDIFY_PLUGINS. '/nice-select/nice-select.css');	
	wp_enqueue_style('edify-gutenberg-blog' , EDIFY_CSS. '/gutenberg.css');	
	wp_enqueue_style('edify-woo' , EDIFY_CSS. '/woocommerce.css');	
	wp_enqueue_style('edify-fontawesome-pro' , EDIFY_CSS. '/font-awesome-pro.css');	
	wp_enqueue_style('edify-elegant-icons' , EDIFY_CSS. '/elegant-icon.css');	
	wp_enqueue_style('edify-main-style' , EDIFY_CSS. '/style.css');	
		wp_enqueue_style('edify-blog' , EDIFY_CSS. '/blog.css');
	

	wp_enqueue_style('edify-responsive' , EDIFY_CSS. '/responsive.css');	
	wp_enqueue_style( 'edify-style', get_stylesheet_uri() );
	wp_style_add_data( 'edify-style', 'rtl', 'replace' );

	// Load JS Files
	wp_enqueue_script( 'popper', EDIFY_PLUGINS . '/bootstrap/popper.min.js', array('jquery'), EDIFY_VERSION, true );
	wp_enqueue_script( 'bootstrap', EDIFY_PLUGINS . '/bootstrap/bootstrap.js', array('jquery'), EDIFY_VERSION, true );
	wp_enqueue_script( 'nice-select', EDIFY_PLUGINS . '/nice-select/nice-select.js', array('jquery'), EDIFY_VERSION, true );
	wp_enqueue_script( 'menu-script', EDIFY_JS . '/menu.js', array('jquery'), EDIFY_VERSION, true );
	wp_enqueue_script( 'edify-script', EDIFY_JS . '/script.js', array('jquery'), EDIFY_VERSION, true );

	wp_localize_script( 'menu-script', 'screenReaderText', array( 'expand'   => __( 'Expand child menu', 'edify' ),
		'collapse' => __( 'Collapse child menu', 'edify' ),
	));
	
	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
		wp_enqueue_script( 'comment-reply' );
	}
}
add_action( 'wp_enqueue_scripts', 'edify_scripts' );


