<?php
/**
 * Includes theme customizer default settings and initialization functions.
 * Provides starter options and configurations for the Customizer.
 *
 * @package Yaatra
 */

 
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

if ( ! function_exists( 'yaatra_get_customizer_option_value' ) ) :

    /**
     * Get the customizer value `get_theme_mod()`
     * 
     * @since 1.0.0
     */
    function yaatra_get_customizer_option_value( $setting_id ) {

        return get_theme_mod( $setting_id, yaatra_get_customizer_default( $setting_id ) );

    }

endif;

if ( ! function_exists( 'yaatra_get_customizer_default' ) ) :

    /**
     * Returns an array of the desired default Yaatra Options
     *
     * @return array
     */
    function yaatra_get_customizer_default( $setting_id ) {

        $default_values = apply_filters( 'yaatra_get_customizer_defaults',
            array(
                'yaatra_site_layout'               => 'fullwidth_layout',

                // wow option
                'yaatra_wow_option'                            => true,
                //preloader
                'yaatra_preloader_enable'                      => true,
                'yaatra_preloader_style'                       => 'wave',
                // social icons
                'social_media_icons'                           => json_encode( array( array( 'cv_icons_list'=>'fab fa-twitter', 'cv_url_field'=>'','item_visible'=>'show' ) ) ),
                //colors
                'yaatra_theme_color'                           => '#27B6D4',
                //sidebar layout
                'yaatra_sidebar_sticky_enable'                 => true,
                'yaatra_archive_sidebar'                       => 'right_sidebar',
                'yaatra_global_post_sidebar'                   => 'right_sidebar',
                'yaatra_global_page_sidebar'                   => 'right_sidebar',
                //scroll top
                'yaatra_scroll_top_option'                     => true,
                //site identity
                'yaatra_site_identity_tabs'                    => 'general',
                //frontpage banner
                'yaatra_front_banner_option'                   => true,
                'yaatra_front_banner_image'                    => '',
                'yaatra_banner_title'                          => __( 'Banner Title', 'yaatra' ),
                'yaatra_banner_content'                        => '',
                'yaatra_banner_btn_text'                       => __( 'Discover', 'yaatra' ),
                'yaatra_banner_btn_link'                       => '',
                // innerpage archive
                'yaatra_archive_layout'                        => 'grid',
                // innerpage single posts
                'yaatra_enable_related_posts'                  => true,
                'related_posts_title'                          =>  __( 'Related Posts', 'yaatra' ),
                'yaatra_related_posts_count'                   => 3,
                'yaatra_related_posts_orderby'                 => 'rp_default',
                // footer
                'yaatra_footer_logo_image'                     => '',
                'yaatra_copyright_text'                        => __( 'Yaatra Copyright &copy; {year}', 'yaatra' )
            )
        );

        return  $default_values[$setting_id];

    }

endif;