<?php 
    class Edumodo_Customizer_Archive_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->archive_learnpress_kirki_config();
        }
        public function archive_learnpress_kirki_config(){

            #   start learndash archive region
                Kirki::add_section( 'edumodo_section_lp_archive', array(
                    'title'          => esc_html__( 'LearnPress', $this->text_domain ),
                    'panel'          => $this->panel_key,
                    'priority'       => $this->priority,
                ) );
                    Kirki::add_field( 'edumodo_learnpress_page_header_image', [
                        'type'        => 'image',
                        'settings'    => 'edumodo_learnpress_page_header_image',
                        'label'       => esc_html__( 'Breadcrumb Background', $this->text_domain ),
                        'section'     => 'edumodo_section_lp_archive',
                        'priority'    => 10,
                    ] );
                    Kirki::add_field( 'edumodo_learnpress_archive_custom_title', [
                        'type'     => 'text',
                        'settings' => 'edumodo_learnpress_archive_custom_title',
                        'label'    => __( 'Custom Title', $this->text_domain ),
                        'section'  => 'edumodo_section_lp_archive',
                        'default'  => esc_html__('Courses',$this->text_domain),
                        'priority' => 10,
                    ] );
                    Kirki::add_field( 'learnpress_archive_seperator_1', [
                        'type'        => 'custom',
                        'settings'    => 'learnpress_archive_seperator_1',
                        'label'       => esc_html__( '', 'edumodo' ),
                        'section'     => 'edumodo_section_lp_archive',
                        '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;">' . __( 'Course Archive  &darr;', 'edumodo' ) . '</h3>',
                        'priority'    => 10,
                    ] );
                    // Kirki::add_field( 'edumodo_archive_lp_course_per_page', [
                    //     'type'        => 'slider',
                    //     'settings'    => 'edumodo_archive_lp_course_per_page',
                    //     'label'       => esc_html__( 'Course Per Page', $this->text_domain ),
                    //     'section'     => 'edumodo_section_lp_archive',
                    //     'default'     => 6,
                    //     'choices'     => [
                    //         'min'  => 0,
                    //         'max'  => 100,
                    //         'step' => 1,
                    //     ],
                    //     'priority' => 10,
                    // ] );
                    Kirki::add_field( 'edumodo_archive_lp_course_grid_column', [
                        'type'        => 'select',
                        'settings'    => 'edumodo_archive_lp_course_grid_column',
                        'label'       => esc_html__( 'Columns', $this->text_domain ),
                        'section'     => 'edumodo_section_lp_archive',
                        'default'     => '4',
                        'priority'    => 10,
                        'multiple'    => 0,
                        'choices'     => [
                            '2' => esc_html__( '2 Columns', $this->text_domain ),
                            '3' => esc_html__( '3 Columns', $this->text_domain ),
                            '4' => esc_html__( '4 Columns', $this->text_domain ),
                            '5' => esc_html__( '5 Columns', $this->text_domain ),
                            '6' => esc_html__( '6 Columns', $this->text_domain ),
                        ]
                    ] );
                    // Kirki::add_field( 'edumodo_archive_lp_course_title_length', [
                    //     'type'        => 'slider',
                    //     'settings'    => 'edumodo_archive_lp_course_title_length',
                    //     'label'       => esc_html__( 'Course Title Length', $this->text_domain ),
                    //     'section'     => 'edumodo_section_lp_archive',
                    //     'default'     => 8,
                    //     'choices'     => [
                    //         'min'  => 1,
                    //         'max'  => 50,
                    //         'step' => 1,
                    //     ],
                    //     'priority' => 10,
                    // ] );
                    // Kirki::add_field( 'edumodo_archive_lp_course_content_length', [
                    //     'type'        => 'slider',
                    //     'settings'    => 'edumodo_archive_lp_course_content_length',
                    //     'label'       => esc_html__( 'Course Content Length', $this->text_domain ),
                    //     'section'     => 'edumodo_section_lp_archive',
                    //     'default'     => 15,
                    //     'choices'     => [
                    //         'min'  => 1,
                    //         'max'  => 150,
                    //         'step' => 1,
                    //     ],
                    //     'priority' => 10,
                    // ] );
                    // Kirki::add_field( 'edumodo_archive_lp_course_button_text', [
                    //     'type'     => 'text',
                    //     'settings' => 'edumodo_archive_lp_course_button_text',
                    //     'label'    => esc_html__( 'Button Text', $this->text_domain ),
                    //     'section'  => 'edumodo_section_lp_archive',
                    //     'default'  => esc_html__('See more',$this->text_domain),
                    //     'priority' => 10,
                    // ] );
                    // Kirki::add_field( 'edumodo_typo_heading', [
                    //     'type' 	=> 'heading',
                    //     'label'	=> 'Typography',
                    //     'section'     => 'edumodo_section_lp_archive',
                    //     'priority' => 10,
                    // ]);
                    Kirki::add_field( 'lp_course_archive_title', [
                        'type'        => 'typography',
                        'settings'    => 'lp_course_archive_title',
                        'label'       => esc_html__( 'Title', $this->text_domain ),
                        'section'     => 'edumodo_section_lp_archive',
                        'priority'    => 10,
                        'transport'   => 'auto',
                        'default'     => [
                            'font-family'    => 'Poppins',
                            'color'			 => '#07294d',
                            'text-transform' => 'none',
                            'font-size'		 => '20px',
                            'line-height'	 => '1.1',
                            'letter-spacing' => '0',
                            'variant'        => '700',
                        ],
                        'output'      => [
                            [
                                'element' => '.post-type-archive-sfwd-courses h3.entry-title',
                            ],
                        ],
                    ] );
                    // Kirki::add_field( 'edumodo_lp_archive_style', [
                    //     'type' 	=> 'heading',
                    //     'label'	=> 'Style',
                    //     'section'     => 'edumodo_section_lp_archive',
                    //     'priority' => 10,
                    // ]);
                    Kirki::add_field( 'edumodo_lp_excerpt_padding', [
                        'type'        => 'dimensions',
                        'settings'    => 'edumodo_lp_excerpt_padding',
                        'label'       => esc_html__( 'Excerpt Padding', $this->text_domain ),
                        'section'     => 'edumodo_section_lp_archive',
                        'priority' => 10,
                        'default'     => [
                            'top'  => '0px',
                            'right'  => '0px',
                            'bottom'  => '0px',
                            'left' => '0px',
                        ],
                    ] );

                    Kirki::add_field( 'learnpress_single_seperator', [
                        'type'        => 'custom',
                        'settings'    => 'learnpress_single_seperator',
                        'label'       => esc_html__( '', 'edumodo' ),
                        'section'     => 'edumodo_section_lp_archive',
                        '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;">' . __( 'Course Single  &darr;', 'edumodo' ) . '</h3>',
                        'priority'    => 10,
                    ] );
                    Kirki::add_field( 'learnpress_lp_single_top_bg_color', [
                        'type'        => 'color',
                        'settings'    => 'learnpress_lp_single_top_bg_color',
                        'label'       => __( 'Background', $this->text_domain ),
                        'section'     => 'edumodo_section_lp_archive',
                        'default'     => '#021c3b'
                    ] );
                    Kirki::add_field( 'learnpress_lp_single_top_text_color', [
                        'type'        => 'color',
                        'settings'    => 'learnpress_lp_single_top_text_color',
                        'label'       => __( 'Color', $this->text_domain ),
                        'section'     => 'edumodo_section_lp_archive',
                        'default'     => '#ffffff'
                    ] );
            #   end of learndash archive region

        }
    }
?>