<?php
/**
 * Bee Real Estate functions and definitions
 *
 * @link https://developer.WordPress.org/themes/basics/theme-functions/
 *
 * @package Bee Real Estate
 * @since Bee Real Estate 1.0
 */

if (!defined('BEE_REAL_ESTATE_VERSION')) {
    // Replace the version number of the theme on each release.
    define('BEE_REAL_ESTATE_VERSION', '1.0.1');
}

if ( ! function_exists( 'bee_real_estate_support' ) ) :
    /**
     * Sets up theme defaults and registers support for various WordPress features.
     *
     * @since 1.0.0
     *
     * @return void
     */

    function bee_real_estate_support() {
        add_editor_style( 'assets/css/editor.css' );
        load_theme_textdomain( 'bee-real-estate', get_template_directory() . '/languages' );
    }

endif;
add_action( 'after_setup_theme', 'bee_real_estate_support' );

function bee_real_estate_scripts() {
	wp_enqueue_script( 'bee-real-estate-scripts', get_template_directory_uri() . '/assets/js/theme.js', array('jquery'),wp_get_theme()->get( 'Version' ) ,true );

	wp_enqueue_script( 'jquery-wow', get_template_directory_uri() . '/assets/js/wow.js', array('jquery'),wp_get_theme()->get( 'Version' ) ,true );
    wp_enqueue_script( 'owl.carousel-js', get_template_directory_uri(). '/assets/js/owl.carousel.js', array('jquery'),wp_get_theme()->get( 'Version' ) ,true );
}
add_action( 'wp_enqueue_scripts', 'bee_real_estate_scripts' );

function bee_real_estate_styles() {
	wp_enqueue_style(
		'bee-real-estate-style',
		get_stylesheet_uri(),
		[],
		wp_get_theme()->get( 'Version' )
	);

	wp_style_add_data( 'bee-real-estate-style', 'rtl', 'replace' );

	wp_enqueue_style( 'dashicons' );

    wp_enqueue_style( 'font-awesome-css', get_template_directory_uri().'/assets/css/all.css', array(), wp_get_theme()->get('Version') );
	
	wp_enqueue_style( 'animate-css', get_template_directory_uri().'/assets/css/animate.css', array(),wp_get_theme()->get( 'Version' ) );
    wp_enqueue_style( 'owl.carousel-style', get_template_directory_uri().'/assets/css/owl.carousel.css', array(),wp_get_theme()->get( 'Version' ) );
}
add_action( 'wp_enqueue_scripts', 'bee_real_estate_styles' );

require_once get_template_directory() . '/tgm/tgm.php';

/**
 * Calling in the admin area for the Welcome Page as well as for the new theme notice too.
 */
if (is_admin()) {
    require get_template_directory() . '/inc/dashboard/class-admin.php';
    require get_template_directory() . '/inc/dashboard/class-dashboard.php';
    require get_template_directory() . '/inc/dashboard/welcome-notice.php';
}

require get_template_directory() . '/inc/dashboard/changelog.php';
require_once get_theme_file_path( '/inc/customizer.php' );