<?php
/**
 * Includes default settings and starter functions for the theme Customizer.
 * 
 * @package Purenote
 */

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

if ( ! function_exists( 'purenote_get_customizer_option_value' ) ) :

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

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

    }

endif;

if ( ! function_exists( 'purenote_get_customizer_default' ) ) :

    /**
     * Returns an array of the default purenote Options.
     *
     * @return array
     */
    function purenote_get_customizer_default( $setting_id ) {

        $default_values = apply_filters( 'purenote_get_customizer_defaults',
            array(
               
                //container
                'purenote_site_container_layout'                => 'separate',
                'purenote_main_container_width'                 => 1320,
                'purenote_boxed_container_width'                => 1290,

                //preloader
                'purenote_preloader_enable'                     => true,
                'purenote_preloader_style'                      => 'wave',
                
                //social icons
                'purenote_social_icon_link_target'               => false,
                'purenote_social_icons'                          => json_encode( array( array( 'social_icon' => 'fab fa-facebook', 'social_url'   => '', 'item_visible'   => 'show' ) ) ),

                //scroll top
                'purenote_scroll_top_enable'                     => true,
                'purenote_scroll_top_arrow'                      => 'fa-arrow-up',

                 //sidebar layout
                'purenote_sidebar_sticky_enable'                 => true,
                'purenote_archive_sidebar_layout'                => 'right-sidebar',
                'purenote_posts_sidebar_layout'                  => 'right-sidebar',
                'purenote_pages_sidebar_layout'                  => 'right-sidebar',

                //colors
                'purenote_primary_theme_color'                   => '#814256',
                'purenote_text_color'                            => '#000000',
                'purenote_link_color'                            => '#000000',
                'purenote_link_hover_color'                      => '#814256',

                 //typography
                'purenote_body_font_family'                      => 'Roboto',
                'purenote_body_font_weight'                      => '400',
                'purenote_body_font_style'                       => 'normal',
                'purenote_body_font_transform'                   => 'inherit',
                'purenote_body_font_decoration'                  => 'inherit',
                'purenote_heading_font_family'                   => 'Nunito',
                'purenote_heading_font_weight'                   => '700',
                'purenote_heading_font_style'                    => 'normal',
                'purenote_heading_font_transform'                => 'inherit',
                'purenote_heading_font_decoration'               => 'inherit',

                 //performance
                'purenote_site_schema_enable'                    => true,

                //top header
                'purenote_header_area_tabs'                      => 'general',
                'purenote_header_top_enable'                     => true,
                'purenote_header_date_enable'                    => true,
                'purenote_header_date_format'                    => 'date_format_1',
                'purenote_header_social_icons_enable'            => true,
                'purenote_header_bg_color'                       => '#814256',
                'purenote_top_header_text_color'                 => '#ffffff',

                 //header
                'purenote_site_identity_tabs'                    => 'general',
                'purenote_site_mode_switcher_option'             => true,
                'purenote_site_mode'                             => 'light-mode',
                'purenote_header_search_enable'                  => true,
                'purenote_header_sticky_enable'                  => true,
                'purenote_header_custom_button_label'            => __( 'Subscribe', 'purenote' ),
                'purenote_header_custom_button_link'             => '',
                'purenote_header_main_bg_type'                   => 'bg-none',
                'purenote_header_main_bg_color'                  => '#814256',
                'purenote_header_main_bg_image'                  => '',
                //primary menu
                'purenote_primary_menu_description_enable'       => true,
               
                //header ticker
                'purenote_header_ticker_enable'                  => true,
                'purenote_header_ticker_label'                   => __( 'Breaking News', 'purenote' ),
                'purenote_ticker_posts_date_filter'              => 'all',
                
                //frontpage banner
                'purenote_frontpage_banner_tabs'                 => 'general',
                'purenote_frontpage_banner_layout'               => 'frontpage-banner-layout',
                'purenote_banner_slider_enable'                  => true,
                'purenote_banner_slider_order_by'                => 'date-desc',
                'purenote_banner_slider_category'                => 'all',
                'purenote_banner_slider_date_filter'             => 'all',
                'purenote_banner_timeline_enable'                => true,
                'purenote_banner_timeline_title'                 => __( 'Trending', 'purenote' ),
                'purenote_banner_timeline_categories'            => 'all',
                'purenote_banner_timeline_order_by'              => 'date-desc',
                'purenote_banner_bg_type'                        => 'bg-none',
                'purenote_banner_bg_color'                       => '#F7F8F9',
                'purenote_banner_bg_image'                       => '',

                //web stories
                'purenote_web_stories_enable'                    => true,
                'purenote_web_stories_title'                     => __( "Today's Stories", 'purenote' ),
                'purenote_web_stories_tabs'                      => 'general',                 
                'purenote_web_stories_orderby'                   => 'date-desc',                    
                'purenote_web_stories_date_filter'               => 'all',                     
                'purenote_web_stories_image_size'                => 'medium',
                'purenote_web_stories_hover_effect'              => 'zoom',                

                //archive page
                'purenote_archive_page_style'                    => 'archive-style--grid',
                'purenote_archive_title_prefix_enable'           => false,
                
                //404 error
                'purenote_error_page_search_enable'              => true,
                'purenote_error_page_button_enable'              => true,
                'purenote_error_page_button_label'               => __('Back To Home', 'purenote'),
                
                 //single posts
                'purenote_single_posts_layout'                   => 'posts-layout--one',
                'purenote_single_posts_author_enable'            => true,
                'purenote_single_posts_related_enable'           => true,
                'purenote_single_posts_related_label'            => __( 'Related Posts', 'purenote' ),
                'purenote_posts_reading_time_enable'             =>  true,

                //footer main area
                'purenote_footer_main_enable'                    => true,
                'purenote_footer_widget_area_layout'             => 'column-three',
                //footer bottom area
                'purenote_footer_bottom_enable'                  => true,
                'purenote_footer_copyright_info'                 => esc_html__( 'Copyright &copy; purenote {year}', 'purenote' )
            )
        );

        return  $default_values[$setting_id];

    }

endif;