<?php 
$wp_customize->add_setting(
    'show_action_box',
    array(
        'default'   => themesflat_customize_default('show_action_box'),
        'sanitize_callback'  => 'themesflat_sanitize_checkbox',
    )
);
$wp_customize->add_control( new themesflat_Checkbox( $wp_customize,
        'show_action_box',
        array(
            'type'      => 'checkbox',
            'label'     => esc_html__('Action Box ( OFF | ON )', 'norstar'),
            'section'   => 'section_action_box',
            'priority'  => 1
        )
    )
);

// Title 1
$wp_customize->add_setting(
    'action_box_title_1',
    array(
        'default' => themesflat_customize_default('action_box_title_1'),
        'sanitize_callback' => 'themesflat_sanitize_text'
    )
);
$wp_customize->add_control(
    'action_box_title_1',
    array(
        'label' => esc_html__( 'Sub Heading', 'norstar' ),
        'section' => 'section_action_box',
        'type' => 'text',
        'priority' => 2
    )
);

//title 2
$wp_customize->add_setting(
    'action_box_title_2',
    array(
        'default' => themesflat_customize_default('action_box_title_2'),
        'sanitize_callback' => 'themesflat_sanitize_text'
    )
);
$wp_customize->add_control(
    'action_box_title_2',
    array(
        'label' => esc_html__( 'Text title 2', 'norstar' ),
        'section' => 'section_action_box',
        'type' => 'text',
        'priority' => 3
    )
);

// Button text 1
$wp_customize->add_setting(
    'action_box_button_text_1',
    array(
        'default' => themesflat_customize_default('action_box_button_text_1'),
        'sanitize_callback' => 'themesflat_sanitize_text'
    )
);
$wp_customize->add_control(
    'action_box_button_text_1',
    array(
        'label' => esc_html__( 'Button text 1', 'norstar' ),
        'section' => 'section_action_box',
        'type' => 'text',
        'priority' => 3
    )
);

// Button text 2
$wp_customize->add_setting(
    'action_box_button_text_2',
    array(
        'default' => themesflat_customize_default('action_box_button_text_2'),
        'sanitize_callback' => 'themesflat_sanitize_text'
    )
);
$wp_customize->add_control(
    'action_box_button_text_2',
    array(
        'label' => esc_html__( 'Button text 2', 'norstar' ),
        'section' => 'section_action_box',
        'type' => 'text',
        'priority' => 4
    )
);

// Button URL 1
$wp_customize->add_setting(
    'action_box_button_url_1',
    array(
        'default' => themesflat_customize_default('action_box_button_link_1'),
        'sanitize_callback' => 'themesflat_sanitize_text'
    )
);
$wp_customize->add_control(
    'action_box_button_url_1',
    array(
        'label' => esc_html__( 'Button Url 1', 'norstar' ),
        'section' => 'section_action_box',
        'type' => 'text',
        'priority' => 5
    )
);

// Button URL 2
$wp_customize->add_setting(
    'action_box_button_url_2',
    array(
        'default' => themesflat_customize_default('action_box_button_link_2'),
        'sanitize_callback' => 'themesflat_sanitize_text'
    )
);
$wp_customize->add_control(
    'action_box_button_url_2',
    array(
        'label' => esc_html__( 'Button Url 2', 'norstar' ),
        'section' => 'section_action_box',
        'type' => 'text',
        'priority' => 6
    )
);

// Heading
$wp_customize->add_setting(
    'action_box_heading',
    array(
        'default' => themesflat_customize_default('action_box_heading_text'),
        'sanitize_callback' => 'themesflat_sanitize_text'
    )
);
$wp_customize->add_control(
    'action_box_heading',
    array(
        'label' => esc_html__( 'Heading Action Box', 'norstar' ),
        'section' => 'section_action_box',
        'type' => 'text',
        'priority' => 7
    )
);

// background
$wp_customize->add_setting(
    'action_box_features_image',
    array(
        'default' => themesflat_customize_default('action_box_features_image'),
        'sanitize_callback' => 'esc_url_raw',
    )
);    
$wp_customize->add_control(
    new WP_Customize_Image_Control(
        $wp_customize,
        'action_box_features_image',
        array(
           'label'          => esc_html__( 'Upload Your Image ', 'norstar' ),
           'description'    => esc_html__( 'If you don\'t display image please remove it your website display 
            Site Title default in General', 'norstar' ),
           'type'           => 'image',
           'section'   =>  'section_action_box',
           'priority'       => 8,
        )
    )
);
