<?php 
    class Edumodo_Customizer_Archive_Teacher{
        private $panel_key;
        private $priority;
        public function __construct($panel_key, $priority){
            $this->panel_key = $panel_key;
            $this->priority = $priority;
            $this->teacher_archive_kirki_config();
        }
        public function teacher_archive_kirki_config(){

            #   start of teacher region 
                Kirki::add_section( 'edumodo_section_teacher_archive', array(
                    'title'          => esc_html__( 'Teacher', 'edumodo' ),
                    'panel'          => $this->panel_key,
                    'priority'       => $this->priority,
                ) );
                    Kirki::add_field( 'edumodo_teacher_page_header_image', [
                        'type'        => 'image',
                        'settings'    => 'edumodo_teacher_page_header_image',
                        'label'       => esc_html__( 'Breadcrumb Background', 'edumodo' ),
                        'section'     => 'edumodo_section_teacher_archive',
                        'priority'    => 10,
                        'active_callback' => [
                            [
                                'setting'  => 'edumodo_section_page_title_trigger',
                                'operator' => '==',
                                'value'    => 'on',
                            ]
                        ]
                    ] );
                    Kirki::add_field( 'edumodo_teacher_archive_custom_title', [
                        'type'     => 'text',
                        'settings' => 'edumodo_teacher_archive_custom_title',
                        'label'    => __( 'Custom Title', 'edumodo' ),
                        'section'  => 'edumodo_section_teacher_archive',
                        'default'  => esc_html__('Teachers','edumodo'),
                        'priority' => 10,
                    ] );
                    Kirki::add_field( 'edumodo__teacher_archive_title_typo', [
                        'type'        => 'typography',
                        'settings'    => 'edumodo__teacher_archive_title_typo',
                        'label'       => esc_html__( 'Title', 'edumodo' ),
                        'section'     => 'edumodo_section_teacher_archive',
                        'priority'    => 10,
                        'transport'   => 'auto',
                        'default'     => [
                            'font-family'    => 'Roboto',
                            'variant'        => 'regular',
                            'color'			 => '#07294d',
                            'text-transform' => 'none',
                            'font-size'		 => '16px',
                            'line-height'	 => '1.1',
                            'letter-spacing' => '0',
                        ],
                        'output'      => [
                            [
                                'element' => '.post-type-archive-teacher .teacher-title',
                            ],
                        ],
                    ] );
                    Kirki::add_field( 'edumodo__teacher_archive_title_margin', [
                        'type'        => 'dimensions',
                        'settings'    => 'edumodo__teacher_archive_title_margin',
                        'label'       => esc_html__( 'Title Spacing', 'edumodo' ),
                        'section'     => 'edumodo_section_teacher_archive',
                        'priority' => 10,
                        'default'     => [
                            'top'  => '15px',
                            // 'right'  => '0px',
                            'bottom'  => '15px',
                            // 'left' => '0px',
                        ],
                    ] );
                    Kirki::add_field( 'edumodo__teacher_archive_designation_typo', [
                        'type'        => 'typography',
                        'settings'    => 'edumodo__teacher_archive_designation_typo',
                        'label'       => esc_html__( 'Designation', 'edumodo' ),
                        'section'     => 'edumodo_section_teacher_archive',
                        'priority'    => 10,
                        'transport'   => 'auto',
                        'default'     => [
                            'font-family'    => 'Roboto',
                            'variant'        => 'regular',
                            'color'			 => '#07294d',
                            'text-transform' => 'none',
                            'font-size'		 => '16px',
                            'line-height'	 => '1.1',
                            'letter-spacing' => '0',
                        ],
                        'output'      => [
                            [
                                'element' => '.post-type-archive-teacher .teacher-designation',
                            ],
                        ],
                    ] );
            #   end of teacher region 


        }
    }
?>