<?php

$wp_customize->add_panel('constructionarc_general_settings_panel', array(
    'title' => esc_html__('General Settings', 'construction-arc'),
    'priority' => 2
));

$wp_customize->add_section('constructionarc_container_section', array(
    'title' => esc_html__('Container', 'construction-arc'),
    'panel' => 'constructionarc_general_settings_panel'
));

$wp_customize->get_control('background_color')->section = 'colors';
$wp_customize->get_control('background_image')->section = 'constructionarc_container_section';
$wp_customize->get_control('background_preset')->section = 'constructionarc_container_section';
$wp_customize->get_control('background_position')->section = 'constructionarc_container_section';
$wp_customize->get_control('background_size')->section = 'constructionarc_container_section';
$wp_customize->get_control('background_repeat')->section = 'constructionarc_container_section';
$wp_customize->get_control('background_attachment')->section = 'constructionarc_container_section';

$wp_customize->get_control('background_image')->priority = 20;
$wp_customize->get_control('background_preset')->priority = 20;
$wp_customize->get_control('background_position')->priority = 20;
$wp_customize->get_control('background_size')->priority = 20;
$wp_customize->get_control('background_repeat')->priority = 20;
$wp_customize->get_control('background_attachment')->priority = 20;

$wp_customize->add_setting('constructionarc_container_width', array(
    'sanitize_callback' => 'absint',
    'default' => 1280,
));
$wp_customize->add_control(new constructionarc_Themes_Range_Control($wp_customize, 'constructionarc_container_width', array(
    'section' => 'constructionarc_container_section',
    'label' => esc_html__('Container Width (px)', 'construction-arc'),
    'input_attrs' => array(
        'min' => 1024,
        'max' => 1420,
        'step' => 1
    )
)));

$wp_customize->add_setting('constructionarc_sidebar_width', array(
    'sanitize_callback' => 'absint',
    'default' => 360,
));
$wp_customize->add_control(new constructionarc_Themes_Range_Control($wp_customize, 'constructionarc_sidebar_width', array(
    'section' => 'constructionarc_container_section',
    'label' => esc_html__('Sidebar Width (px)', 'construction-arc'),
    'input_attrs' => array(
        'min' => 300,
        'max' => 380,
        'step' => 1
    )
)));

$wp_customize->add_section('constructionarc_backtotop_section', array(
    'title' => esc_html__('Scroll to Top', 'construction-arc'),
    'panel' => 'constructionarc_general_settings_panel'
));

$wp_customize->add_setting('constructionarc_backtotop', array(
    'sanitize_callback' => 'constructionarc_themes_sanitize_text',
    'default' => true,
));
$wp_customize->add_control(new constructionarc_Switch_Control($wp_customize, 'constructionarc_backtotop', array(
    'section' => 'constructionarc_backtotop_section',
    'label' => esc_html__('Enable', 'construction-arc'),
    'switch_label' => array(
        'enable' => esc_html__('Yes', 'construction-arc'),
        'disable' => esc_html__('No', 'construction-arc'),
    ),
)));


$wp_customize->add_setting('constructionarc_pro_upgrade_text', array(
    'sanitize_callback' => 'constructionarc_sanitize_text'
));
$wp_customize->add_control(new constructionarc_Themes_Upgrade_Text($wp_customize, 'constructionarc_pro_upgrade_text', array(
    'section' => 'constructionarc_backtotop_section',
    'label' => esc_html__('For More Settings,', 'construction-arc'),
    'choices' => array(
        esc_html__('Change differents icon', 'construction-arc'),
        esc_html__('Adjust up arrow position ( Left corner or Right corner )', 'construction-arc'),
        esc_html__('Change background & font color', 'construction-arc')
    ),
    'priority' => 250,
)));