<?php
include(get_stylesheet_directory() . '/default_options_child.php');
include(get_stylesheet_directory() . '/customizer_child.php');
add_action( 'wp_enqueue_scripts', 'unify_enqueue_in_footer_child');
function unify_enqueue_in_footer_child(){
    $unify_theme_options = unify_theme_options();

    $parent_style = 'matrix_main_style'; // This is 'awada' for the Awada theme.
    wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css', array( 'bootstrap' ) );
    wp_enqueue_style( 'unify',
        get_stylesheet_directory_uri() . '/style.css',
        array( $parent_style, 'bootstrap' ),
        wp_get_theme()->get('Version')
    );

	if($unify_theme_options['color_scheme_child']==''){
		wp_enqueue_style('matrix_color_scheme', get_stylesheet_directory_uri() . '/css/colors/blue.css');
	} else {
		wp_enqueue_style('matrix_color_scheme', get_stylesheet_directory_uri() . '/css/colors/' . esc_attr($unify_theme_options['color_scheme_child']) . '.css');
	}
}
function unify_theme_setup()
{
	load_child_theme_textdomain('matrix', get_template_directory() . '/functions/lang');
	add_theme_support( 'custom-logo', array(
		'height'      => 70,
		'width'       => 150,
		'flex-height' => true,
		'flex-width'  => true,
	) );
	Kirki::add_field('matrix_theme', array(
		'settings'          => 'header_topbar_bg_color',
		'label'             => __('Header Top Bar Background Color', 'unify'),
		'description'       => __('Change Top bar Background Color', 'unify'),
		'section'           => 'colors',
		'type'              => 'color',
		'priority'          => 9,
		'default'           => '#00afd1',
		'sanitize_callback' => 'matrix_sanitize_color',
		'output'            => array(
			array(
				'element'  => '.top-bar',
				'property' => 'background-color',
			),
			array(
				'element'  => '.top-bar',
				'property' => 'border-bottom',
			),
		),
		'transport'         => 'auto'
	));
}
add_action('after_setup_theme', 'unify_theme_setup');

function unify_slug_customize_register( $wp_customize ) {
	$wp_customize->remove_control('matrix_theme_options[color_scheme]');
}
add_action('customize_register', 'unify_slug_customize_register', 100 );
?>