<?php
/**
* Header Options.
*
* @package Green Nursery
*/

$green_nursery_default = green_nursery_get_default_theme_options();

// Header Section.
$wp_customize->add_section( 'green_nursery_button_header_setting',
	array(
	'title'      => esc_html__( 'Header Settings', 'green-nursery' ),
	'priority'   => 10,
	'capability' => 'edit_theme_options',
	'panel'      => 'green_nursery_theme_option_panel',
	)
);

$wp_customize->add_setting( 'green_nursery_header_layout_button_url',
    array(
    'default'           => $green_nursery_default['green_nursery_header_layout_button_url'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'green_nursery_header_layout_button_url',
    array(
    'label'    => esc_html__( 'Button Url', 'green-nursery' ),
    'section'  => 'green_nursery_button_header_setting',
    'type'     => 'url',
    )
);

$wp_customize->add_setting('green_nursery_sticky',
    array(
        'default' => $green_nursery_default['green_nursery_sticky'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'green_nursery_sanitize_checkbox',
    )
);
$wp_customize->add_control('green_nursery_sticky',
    array(
        'label' => esc_html__('Enable Sticky Header', 'green-nursery'),
        'section' => 'green_nursery_button_header_setting',
        'type' => 'checkbox',
    )
);

$wp_customize->add_setting('green_nursery_menu_font_size',
    array(
        'default'           => $green_nursery_default['green_nursery_menu_font_size'],
        'capability'        => 'edit_theme_options',
        'sanitize_callback' => 'green_nursery_sanitize_number_range',
    )
);
$wp_customize->add_control('green_nursery_menu_font_size',
    array(
        'label'       => esc_html__('Menu Font Size', 'green-nursery'),
        'section'     => 'green_nursery_button_header_setting',
        'type'        => 'number',
        'input_attrs' => array(
           'min'   => 1,
           'max'   => 30,
           'step'   => 1,
        ),
    )
);

$wp_customize->add_setting( 'green_nursery_menu_text_transform',
    array(
    'default'           => $green_nursery_default['green_nursery_menu_text_transform'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'green_nursery_sanitize_menu_transform',
    )
);
$wp_customize->add_control( 'green_nursery_menu_text_transform',
    array(
    'label'       => esc_html__( 'Menu Text Transform', 'green-nursery' ),
    'section'     => 'green_nursery_button_header_setting',
    'type'        => 'select',
    'choices'     => array(
        'capitalize' => esc_html__( 'Capitalize', 'green-nursery' ),
        'uppercase'  => esc_html__( 'Uppercase', 'green-nursery' ),
        'lowercase'    => esc_html__( 'Lowercase', 'green-nursery' ),
        ),
    )
);