<?php 
    class Edumodo_Customizer_Single_Learnpress{
        private $panel_key;
        private $priority;
        private $text_domain = 'edumodo';
        public function __construct($panel_key, $priority){
            $this->panel_key = $panel_key;
            $this->priority = $priority;
            $this->single_learnpress_kirki_config();
        }
        public function single_learnpress_kirki_config(){
            #	start of learnpress region
                Kirki::add_section( 'edumodo_section_lp_single', array(
                    'title'          => esc_html__( 'LearnPress', $this->text_domain ),
                    'panel'          => $this->panel_key,
                    'priority'       => $this->priority
                ) );
                    Kirki::add_field( 'edumodo_learnpress_single_page_header_image', [
                        'type'        => 'image',
                        'settings'    => 'edumodo_learnpress_single_page_header_image',
                        'label'       => esc_html__( 'Breadcrumb Background', $this->text_domain ),
                        'section'     => 'edumodo_section_lp_single',
                        'priority'    => 10,
                        'active_callback' => [
                            [
                                'setting'  => 'edumodo_section_page_title_trigger',
                                'operator' => '==',
                                'value'    => 'on',
                            ]
                        ]
                    ] );
                    Kirki::add_field( 'edumodo_learnpress_single_hero_area_custom_title', [
                        'type'     => 'text',
                        'settings' => 'edumodo_learnpress_single_hero_area_custom_title',
                        'label'    => __( 'Custom Title', $this->text_domain ),
                        'section'  => 'edumodo_section_lp_single',
                        'default'  => esc_html__('Single Course',$this->text_domain),
                        'priority' => 10,
                    ] );
                    
                    Kirki::add_field( 'learnpress_single_seperator_1', [
                        'type'        => 'custom',
                        'settings'    => 'learnpress_single_seperator_1',
                        'label'       => esc_html__( '', 'edumodo' ),
                        'section'     => 'edumodo_section_lp_single',
                        'default'     => '<h3 style="border: solid 1px #b3b3b3; text-align: center; letter-spacing: 2px;padding:15px 10px; background:#cecece; text-transform:uppercase; margin:10px -20px 5px;">' . __( 'Settings  &darr;', 'edumodo' ) . '</h3>',
                        'priority'    => 10,
                    ] );
                    Kirki::add_field( 'edumodo_single_lp_course_login_popup', [
                        'type'        => 'radio-buttonset',
                        'settings'    => 'edumodo_single_lp_course_login_popup',
                        'label'       => esc_html__( 'Login Popup', $this->text_domain ),
                        'section'     => 'edumodo_section_lp_single',
                        'default'     => 'on',
                        'priority'    => 10,
                        'choices'     => [
                            'on'   => esc_html__( 'Yes', $this->text_domain ),
                            'off' => esc_html__( 'No', $this->text_domain )
                        ],
                    ] );

                    Kirki::add_field( 'edumodo_single_lp_course_layout', [
                        'type'        => 'select',
                        'settings'    => 'edumodo_single_lp_course_layout',
                        'label'       => esc_html__( 'Layout', $this->text_domain ),
                        'section'     => 'edumodo_section_lp_single',
                        'default'     => '1',
                        'priority'    => 10,
                        'multiple'    => 0,
                        'choices'     => [
                            '1' => esc_html__( 'Style One', $this->text_domain ),
                            '2' => esc_html__( 'Style Two', $this->text_domain ),
                            '3' => esc_html__( 'Style Three', $this->text_domain ),
                        ]
                    ] );

                    Kirki::add_field( 'edumodo_single_lp_course_category', [
                        'type'        => 'radio-buttonset',
                        'settings'    => 'edumodo_single_lp_course_category',
                        'label'       => esc_html__( 'Category', $this->text_domain ),
                        'section'     => 'edumodo_section_lp_single',
                        'default'     => 'on',
                        'priority'    => 10,
                        'choices'     => [
                            'on'   => esc_html__( 'Yes', $this->text_domain ),
                            'off' => esc_html__( 'No', $this->text_domain )
                        ],
                    ] );
                    Kirki::add_field( 'edumodo_single_lp_course_author', [
                        'type'        => 'radio-buttonset',
                        'settings'    => 'edumodo_single_lp_course_author',
                        'label'       => esc_html__( 'Author', $this->text_domain ),
                        'section'     => 'edumodo_section_lp_single',
                        'default'     => 'on',
                        'priority'    => 10,
                        'choices'     => [
                            'on'   => esc_html__( 'Yes', $this->text_domain ),
                            'off' => esc_html__( 'No', $this->text_domain )
                        ],
                        'active_callback' => [
                            [
                                'setting'  => 'edumodo_single_lp_course_layout',
                                'operator' => '==',
                                'value'    => '3',
                            ]
                        ],
                    ] );
                    Kirki::add_field( 'edumodo_single_lp_course_update', [
                        'type'        => 'radio-buttonset',
                        'settings'    => 'edumodo_single_lp_course_update',
                        'label'       => esc_html__( 'Update Time', $this->text_domain ),
                        'section'     => 'edumodo_section_lp_single',
                        'default'     => 'on',
                        'priority'    => 10,
                        'choices'     => [
                            'on'   => esc_html__( 'Yes', $this->text_domain ),
                            'off' => esc_html__( 'No', $this->text_domain )
                        ],
                        'active_callback' => [
                            [
                                'setting'  => 'edumodo_single_lp_course_layout',
                                'operator' => '==',
                                'value'    => '3',
                            ]
                        ],
                    ] );
                    Kirki::add_field( 'edumodo_single_lp_course_enrolled_user', [
                        'type'        => 'radio-buttonset',
                        'settings'    => 'edumodo_single_lp_course_enrolled_user',
                        'label'       => esc_html__( 'Enrolled Student', $this->text_domain ),
                        'section'     => 'edumodo_section_lp_single',
                        'default'     => 'on',
                        'priority'    => 10,
                        'choices'     => [
                            'on'   => esc_html__( 'Yes', $this->text_domain ),
                            'off' => esc_html__( 'No', $this->text_domain )
                        ],
                        'active_callback' => [
                            [
                                'setting'  => 'edumodo_single_lp_course_layout',
                                'operator' => '==',
                                'value'    => '3',
                            ]
                        ],
                    ] );
                    Kirki::add_field( 'edumodo_single_lp_course_related_course', [
                        'type'        => 'radio-buttonset',
                        'settings'    => 'edumodo_single_lp_course_related_course',
                        'label'       => esc_html__( 'Related Course', $this->text_domain ),
                        'section'     => 'edumodo_section_lp_single',
                        'default'     => 'on',
                        'priority'    => 10,
                        'choices'     => [
                            'on'   => esc_html__( 'Yes', $this->text_domain ),
                            'off' => esc_html__( 'No', $this->text_domain )
                        ],
                    ] );
            #	end of learnpress region


        }
    }
?>