<?php


    // header_logo_section section 
    new \Kirki\Field\Image(
        [
            'settings'    => 'header_custom_logo',
            'label'       => esc_html__( 'Header Logo', 'edify' ),
            'description' => esc_html__( 'Upload your logo here. If left empty (and no logo is set under Appearance > Customize > Site Identity), the Site Title will be shown as text instead.', 'edify' ),
            'section'     => 'header_section_id',
            'default'     => '',
        ]
    );

    new \Kirki\Field\Checkbox_Switch([
        'type'        => 'switch',
        'settings'    => 'header_right_switch',
        'label'       => esc_html__( 'Enable/Disable Right Content','edify'),
        'section'     => 'header_section_id',
        'default'     => '1',
        'priority'    => 10,
        'choices'     => [
            'on'  => esc_html__( 'Yes','edify'),
            'off' => esc_html__( 'No','edify'),
        ],
    ] );


new \Kirki\Field\Select(
	[
		'settings'    => 'header_menu_style_position',
	    'label'       => esc_html__( 'Menu Position', 'edify' ),
        'section'     => 'header_section_id',
		'default'     => 'start',
		'priority'    => 10,
		'choices'     => [
			'start' => esc_html__( 'Start', 'edify' ),
			'center' => esc_html__( 'Center', 'edify'),
			'right' => esc_html__( 'Right', 'edify' ),
		],
		
	]
);




new \Kirki\Field\Checkbox_Switch([
    'type'        => 'switch',
    'settings'    => 'show_header_btn',
    'label'       => esc_html__( 'Enable/Disable Button','edify'),
    'section'     => 'header_section_id',
    'default'     => '1',
    'priority'    => 10,
    'choices'     => [
        'on'  => esc_html__( 'Yes','edify'),
        'off' => esc_html__( 'No','edify'),
    ],
    'active_callback' => [
        [
            'setting'  => 'header_right_switch',
            'operator' => '==',
            'value'    => '1',
        ]
    ],
] );


new \Kirki\Field\Checkbox_Switch([
    'type'        => 'switch',
    'settings'    => 'show_mini_cart',
    'label'       => esc_html__( 'Enable/Disable Mini Cart','edify'),
    'section'     => 'header_section_id',
    'default'     => '1',
    'priority'    => 10,
    'choices'     => [
        'on'  => esc_html__( 'Yes','edify'),
        'off' => esc_html__( 'No','edify'),
    ],
    'active_callback' => [
        [
            'setting'  => 'header_right_switch',
            'operator' => '==',
            'value'    => '1',
        ]
    ],
] );



Kirki::add_field( 'db_theme_config_id', [
    'type'        => 'text',
    'settings'    => 'header_btn_text',
    'label'       => esc_html__( 'Header Button text','edify'),
    'section'     => 'header_section_id',
    'default'     => esc_html__( 'Register','edify'),
    'priority'    => 10,
    'active_callback' => [
        [
            'setting'  => 'show_header_btn',
            'operator' => '==',
            'value'    => '1',
        ]
    ],
] );

Kirki::add_field( 'db_theme_config_id', [
    'type'        => 'url',
    'settings'    => 'header_btn_link',
    'label'       => esc_html__( 'Button Link','edify'),
    'section'     => 'header_section_id',
    'default'     => esc_html__( '#','edify'),
    'priority'    => 10,
    'active_callback' => [
        [
            'setting'  => 'show_header_btn',
            'operator' => '==',
            'value'    => '1',
        ]
    ],
] );


new Kirki\Field\Select(
    [
        'settings'    => 'dynamic_page_link',
        'label'       => __( 'Select Page Link', 'edify' ),
        'section'     => 'header_section_id',
        'default'     => '',
        'priority'    => 10,
        'multiple'    => 1,
        'placeholder' => __( 'Select Page', 'edify' ),
        'choices'     => Kirki\Util\Helper::get_posts(
            array(
                'posts_per_page' => 10,
                'post_type'      => 'page'
            ) ,
        ),
        'active_callback' => [
            [
                'setting'  => 'show_header_btn',
                'operator' => '==',
                'value'    => '1',
            ]
        ],
    ]
);

/* ---- Header Button Style ---- */

new \Kirki\Field\Color([
    'type'        => 'color',
    'settings'    => 'header_btn_color',
    'label'       => esc_html__( 'Header Button Text Color','edify'),
    'section'     => 'header_section_id',
    'default'     => '#ffffff',
    'choices'     => [ 'alpha' => true ],
    'active_callback' => [
        [ 'setting' => 'show_header_btn', 'operator' => '==', 'value' => '1' ]
    ],
] );

new \Kirki\Field\Color([
    'type'        => 'color',
    'settings'    => 'header_btn_bg_color',
    'label'       => esc_html__( 'Header Button Background Color','edify'),
    'section'     => 'header_section_id',
    'default'     => '',
    'choices'     => [ 'alpha' => true ],
    'active_callback' => [
        [ 'setting' => 'show_header_btn', 'operator' => '==', 'value' => '1' ]
    ],
] );

new \Kirki\Field\Color([
    'type'        => 'color',
    'settings'    => 'header_btn_border_color',
    'label'       => esc_html__( 'Header Button Border Color','edify'),
    'section'     => 'header_section_id',
    'default'     => '',
    'choices'     => [ 'alpha' => true ],
    'active_callback' => [
        [ 'setting' => 'show_header_btn', 'operator' => '==', 'value' => '1' ]
    ],
] );

new \Kirki\Field\Slider([
    'type'        => 'slider',
    'settings'    => 'header_btn_border_radius',
    'label'       => esc_html__( 'Header Button Border Radius','edify'),
    'section'     => 'header_section_id',
    'default'     => 5,
    'choices'     => [
        'min'    => 0,
        'max'    => 50,
        'step'   => 1,
        'suffix' => 'px',
    ],
    'active_callback' => [
        [ 'setting' => 'show_header_btn', 'operator' => '==', 'value' => '1' ]
    ],
] );

new \Kirki\Field\Color([
    'type'        => 'color',
    'settings'    => 'header_btn_hover_color',
    'label'       => esc_html__( 'Header Button Hover Text Color','edify'),
    'section'     => 'header_section_id',
    'default'     => '',
    'choices'     => [ 'alpha' => true ],
    'active_callback' => [
        [ 'setting' => 'show_header_btn', 'operator' => '==', 'value' => '1' ]
    ],
] );

new \Kirki\Field\Color([
    'type'        => 'color',
    'settings'    => 'header_btn_hover_bg_color',
    'label'       => esc_html__( 'Header Button Hover Background Color','edify'),
    'section'     => 'header_section_id',
    'default'     => '',
    'choices'     => [ 'alpha' => true ],
    'active_callback' => [
        [ 'setting' => 'show_header_btn', 'operator' => '==', 'value' => '1' ]
    ],
] );

new \Kirki\Field\Color([
    'type'        => 'color',
    'settings'    => 'header_btn_hover_border_color',
    'label'       => esc_html__( 'Header Button Hover Border Color','edify'),
    'section'     => 'header_section_id',
    'default'     => '',
    'choices'     => [ 'alpha' => true ],
    'active_callback' => [
        [ 'setting' => 'show_header_btn', 'operator' => '==', 'value' => '1' ]
    ],
] );

