<?php
/**
 * Dark/Light Option.
 *
 * @package United Blog
 */

$default = united_blog_get_default_theme_options();

$wp_customize->add_section(
	'light_dark_options',
	array(
		'title' => __( 'Light/Dark Options', 'united-blog' ),
		'panel' => 'theme_general_panel',

	)
);

$wp_customize->add_setting('show_light_dark_switch',
    array(
        'default'           => $default['show_light_dark_switch'],
        'capability'        => 'edit_theme_options',
        'sanitize_callback' => 'united_blog_sanitize_checkbox',
    )
);
$wp_customize->add_control('show_light_dark_switch',
    array(
    	'label'       => __( 'Enable Light/Dark Switch', 'united-blog' ),
    	'description' => __( 'Enable site mode switcher between day and night based on site theme', 'united-blog' ),
        'section'  => 'light_dark_options',
        'type'     => 'checkbox',
    )
);

$wp_customize->add_setting('force_dark_mode',
    array(
        'default'           => $default['force_dark_mode'],
        'capability'        => 'edit_theme_options',
        'sanitize_callback' => 'united_blog_sanitize_checkbox',
    )
);
$wp_customize->add_control('force_dark_mode',
    array(
    	'label'       => __( 'Force Dark Mode', 'united-blog' ),
    	'description' => __( 'Set site mode to dark only', 'united-blog' ),
        'section'  => 'light_dark_options',
        'type'     => 'checkbox',
    )
);

// Grid Line Section.
$wp_customize->add_section('gird_line_section',
    array(
        'title'      => esc_html__('Grid Line Options', 'united-blog'),
        'capability' => 'edit_theme_options',
        'panel'      => 'theme_general_panel',
    )
);

// Setting enable_grid_line_option.
$wp_customize->add_setting('enable_grid_line_option',
    array(
        'default' => $default['enable_grid_line_option'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'united_blog_sanitize_checkbox',
    )
);
$wp_customize->add_control('enable_grid_line_option',
    array(
        'label' => esc_html__('Enable Grid Line', 'united-blog'),
        'section' => 'gird_line_section',
        'type' => 'checkbox',
        'priority' => 100,
    )
);


// Preloader Section.
$wp_customize->add_section('preloader_section',
    array(
        'title'      => esc_html__('Preloader Options', 'united-blog'),
        'capability' => 'edit_theme_options',
        'panel'      => 'theme_general_panel',
    )
);

// Setting enable_preloader_option.
$wp_customize->add_setting('enable_preloader_option',
    array(
        'default' => $default['enable_preloader_option'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'united_blog_sanitize_checkbox',
    )
);
$wp_customize->add_control('enable_preloader_option',
    array(
        'label' => esc_html__('Enable Preloader Option', 'united-blog'),
        'section' => 'preloader_section',
        'type' => 'checkbox',
        'priority' => 100,
    )
);

// Cursor Section.
$wp_customize->add_section('cursor_section',
    array(
        'title'      => esc_html__('Cursor Options', 'united-blog'),
        'capability' => 'edit_theme_options',
        'panel'      => 'theme_general_panel',
    )
);

// Setting enable_cursor_option.
$wp_customize->add_setting('enable_cursor_option',
    array(
        'default' => $default['enable_cursor_option'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'united_blog_sanitize_checkbox',
    )
);
$wp_customize->add_control('enable_cursor_option',
    array(
        'label' => esc_html__('Enable Custom Cursor', 'united-blog'),
        'section' => 'cursor_section',
        'type' => 'checkbox',
        'priority' => 100,
    )
);

