<?php
/**
 * Carpet Services functions and definitions
 *
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 *
 * @subpackage Carpet Services
 * @since Carpet Services 1.0
 */

if ( ! function_exists( 'carpet_services_setup' ) ) :
/**
 * Sets up theme defaults and registers support for various WordPress features.
 *
 * Note that this function is hooked into the after_setup_theme hook, which runs
 * before the init hook. The init hook is too late for some features, such as indicating
 * support post thumbnails.
 */
function carpet_services_setup() {
	load_theme_textdomain( 'carpet-services', get_template_directory() . '/languages' );

	// Enqueue editor styles.
	add_editor_style(get_stylesheet_directory_uri() . '/assets/css/editor-style.css');
}
endif;
add_action( 'after_setup_theme', 'carpet_services_setup' );

function carpet_services_block_assets(){
	wp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/assets/font-awesome/css/all.css', array(), '7.1.0' );
	wp_enqueue_style( 'animatecss', get_template_directory_uri() . '/assets/css/animate.css', array(), '4.1.1' );
	wp_enqueue_style( 'carpet-services-style', get_template_directory_uri() . '/style.css', array(), wp_get_theme()->get( 'Version' ) );
	wp_enqueue_script('wow-script', get_template_directory_uri() . '/assets/js/wow.js', array('jquery'), false, true);
	wp_enqueue_script('carpet-services-script', get_template_directory_uri() . '/assets/js/script.js', array('jquery'), '1.0.0', true);
	wp_style_add_data( 'carpet-services-style', 'rtl', 'replace' );
}
add_action('enqueue_block_assets', 'carpet_services_block_assets');

// TGM
require get_theme_file_path('/inc/tgm/tgm.php');