<?php 
    class Edumodo_Customizer_General_Page_Header{
        private $panel_key;
        private $priority;
        private $text_domain = 'edumodo';
        public function __construct($panel_key, $priority){
            $this->panel_key = $panel_key;
            $this->priority = $priority;
            $this->general_page_header_kirki_config();
        }
        public function general_page_header_kirki_config(){

            #   start page header region 
                Kirki::add_section('edumodo_general_page_header', array(
                    'title' => esc_attr__('Page Header', $this->text_domain),
                    'panel' => $this->panel_key,
                    'priority' => $this->priority,
                ) );
                    Kirki::add_field( 'edumodo_section_enable_page_title', [
                        'type'        => 'radio-buttonset',
                        'settings'    => 'edumodo_section_enable_page_title',
                        'label'       => esc_html__( 'Enable', $this->text_domain ),
                        'section'     => 'edumodo_general_page_header',
                        'default'     => 'on',
                        'priority'    => 10,
                        'choices'     => [
                            'on'   => esc_html__( 'Yes', $this->text_domain ),
                            'off' => esc_html__( 'No', $this->text_domain )
                        ],
                    ] );
                    Kirki::add_field( 'edumodo_enable_breadcrumb', [
                        'type'        => 'radio-buttonset',
                        'settings'    => 'edumodo_enable_breadcrumb',
                        'label'       => esc_html__( 'Breadcrumb', $this->text_domain ),
                        'section'     => 'edumodo_general_page_header',
                        'default'     => 'on',
                        'priority'    => 10,
                        'choices'     => [
                            'on'   => esc_html__( 'Yes', $this->text_domain ),
                            'off' => esc_html__( 'No', $this->text_domain )
                        ],
                        'active_callback' => [
                            [
                                'setting'  => 'edumodo_section_enable_page_title',
                                'operator' => '==',
                                'value'    => 'on',
                            ]
                        ]
                    ] );
                    Kirki::add_field('edumodo_page_header_image', [
                        'type'        => 'image',
                        'settings'    => 'edumodo_page_header_image',
                        'label'       => esc_html__('Breadcrumb Background', $this->text_domain),
                        'section'     => 'edumodo_general_page_header',
                        'priority'    => 10,
                        'active_callback' => [
                            [
                                'setting'  => 'edumodo_section_enable_page_title',
                                'operator' => '==',
                                'value'    => 'on',
                            ]
                        ]
                    ]);
                    Kirki::add_field( 'edumodo_blog_archive_search', [
                        'type'        => 'checkbox',
                        'settings'    => 'edumodo_blog_archive_search',
                        'label'       => esc_html__( 'Enable Archive Search', $this->text_domain ),
                        'section'     => 'edumodo_archive_blog',
                        'default'     => true,
                        'priority'    => 10,
                    ] );
                    Kirki::add_field( 'page_header_overlay', [
                        'type'        => 'color',
                        'settings'    => 'page_header_overlay',
                        'label'       => __( 'Overlay', $this->text_domain ),
                        'section'     => 'edumodo_general_page_header',
                        'default'     => '#242c5e',
                        'choices'     => [
                            'alpha' => true,
                        ],
                        'priority' 	  => 10,
                        'active_callback' => [
                            [
                                'setting'  => 'edumodo_section_enable_page_title',
                                'operator' => '==',
                                'value'    => 'on',
                            ]
                        ]
                    ] );
                    Kirki::add_field( 'page_header_padding', [
                        'type'        => 'dimensions',
                        'settings'    => 'page_header_padding',
                        'label'       => esc_html__( 'Padding', $this->text_domain ),
                        'section'     => 'edumodo_general_page_header',
                        'default'     => [
                            'top'  => '75px',
                            'right' => '0px',
                            'bottom' => '75px',
                            'left' => '0px',
                        ],
                        'priority' 	  => 10,
                        'active_callback' => [
                            [
                                'setting'  => 'edumodo_section_enable_page_title',
                                'operator' => '==',
                                'value'    => 'on',
                            ]
                        ]
                    ] );
            #   end of page header region 
        }
    }
?>