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

            #   start of notice region 

                Kirki::add_section('edumodo_section_archive_notice', array(
                    'title' => esc_attr__('Notice', $this->text_domain),
                    'panel' => $this->panel_key,
                    'priority' => $this->priority,
                ));
                    Kirki::add_field( 'edumodo_notice_page_header_image', [
                        'type'        => 'image',
                        'settings'    => 'edumodo_notice_page_header_image',
                        'label'       => esc_html__( 'Breadcrumb Background', $this->text_domain ),
                        'section'     => 'edumodo_section_archive_notice',
                        'priority'    => 10,
                        'active_callback' => [
                            [
                                'setting'  => 'edumodo_section_page_title_trigger',
                                'operator' => '==',
                                'value'    => 'on',
                            ]
                        ]
                    ] );
                    Kirki::add_field( 'edumodo_notice_archive_title', [
                        'type'     => 'text',
                        'settings' => 'edumodo_notice_archive_title',
                        'label'    => __( 'Custom Title', $this->text_domain ),
                        'section'  => 'edumodo_section_archive_notice',
                        'default'  => esc_html__('All Notices',$this->text_domain),
                        'priority' => 10,
                    ] );

                    Kirki::add_field( 'notice_archive_seperator_1', [
                        'type'        => 'custom',
                        'settings'    => 'notice_archive_seperator_1',
                        'label'       => esc_html__( '', 'edumodo' ),
                        'section'     => 'edumodo_section_archive_notice',
                        '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_notice_archive_per_page', [
                        'type'        => 'slider',
                        'settings'    => 'edumodo_notice_archive_per_page',
                        'label'       => esc_html__( 'Per Page', $this->text_domain ),
                        'section'     => 'edumodo_section_archive_notice',
                        'default'     => 6,
                        'choices'     => [
                            'min'  => 0,
                            'max'  => 100,
                            'step' => 1,
                        ],
                        'priority' => 10,
                    ] );
                    Kirki::add_field( 'edumodo_archive_notice_grid_column', [
                        'type'        => 'select',
                        'settings'    => 'edumodo_archive_notice_grid_column',
                        'label'       => esc_html__( 'Columns', $this->text_domain ),
                        'section'     => 'edumodo_section_archive_notice',
                        'default'     => '4',
                        'priority'    => 10,
                        'multiple'    => 0,
                        'choices'     => [
                            '6' => esc_html__( '2 Columns', $this->text_domain ),
                            '4' => esc_html__( '3 Columns', $this->text_domain ),
                            '3' => esc_html__( '4 Columns', $this->text_domain ),
                            '2' => esc_html__( '6 Columns', $this->text_domain ),
                        ]
                    ] );
                    Kirki::add_field( 'edumodo_notice_archive_image_size', [
                        'type'        => 'select',
                        'settings'    => 'edumodo_notice_archive_image_size',
                        'label'       => esc_html__( 'Image Size', $this->text_domain ),
                        'section'     => 'edumodo_section_archive_notice',
                        'priority'    => 10,
                        'multiple'    => 0,
                        'default'	  => 'tx_course_archive',
                        'choices'     => edumodo_image_sizes_by_array()
                    ] );
                    // Kirki::add_field( 'edumodo_notice_archive_title_length', [
                    //     'type'        => 'slider',
                    //     'settings'    => 'edumodo_notice_archive_title_length',
                    //     'label'       => esc_html__( 'Title Length', $this->text_domain ),
                    //     'section'     => 'edumodo_section_archive_notice',
                    //     'default'     => 8,
                    //     'choices'     => [
                    //         'min'  => 1,
                    //         'max'  => 50,
                    //         'step' => 1,
                    //     ],
                    //     'priority' => 10,
                    // ] );
                    Kirki::add_field( 'edumodo_archive_notice_content_trigger', [
                        'type'        => 'radio-buttonset',
                        'settings'    => 'edumodo_archive_notice_content_trigger',
                        'label'       => esc_html__( 'Content', $this->text_domain ),
                        'section'     => 'edumodo_section_archive_notice',
                        'default'     => 'on',
                        'priority'    => 10,
                        'choices'     => [
                            'on'   => esc_html__( 'Show', $this->text_domain ),
                            'off' => esc_html__( 'Hide', $this->text_domain )
                        ],
                    ] );
                    Kirki::add_field( 'edumodo_notice_archive_content_length', [
                        'type'        => 'slider',
                        'settings'    => 'edumodo_notice_archive_content_length',
                        'label'       => esc_html__( 'Content Length', $this->text_domain ),
                        'section'     => 'edumodo_section_archive_notice',
                        'default'     => 15,
                        'choices'     => [
                            'min'  => 1,
                            'max'  => 150,
                            'step' => 1,
                        ],
                        'priority' => 10,
                        'active_callback' => [
                            [
                                'setting'  => 'edumodo_archive_notice_content_trigger',
                                'operator' => '==',
                                'value'    => 'on',
                            ]
                        ],
                    ] );
                    Kirki::add_field( 'edumodo_archive_notice_date', [
                        'type'        => 'radio-buttonset',
                        'settings'    => 'edumodo_archive_notice_date',
                        'label'       => esc_html__( 'Date', $this->text_domain ),
                        'section'     => 'edumodo_section_archive_notice',
                        'default'     => 'on',
                        'priority'    => 10,
                        'choices'     => [
                            'on'   => esc_html__( 'Show', $this->text_domain ),
                            'off' => esc_html__( 'Hide', $this->text_domain )
                        ],
                    ] );
                    Kirki::add_field( 'edumodo_archive_notice_page_views', [
                        'type'        => 'radio-buttonset',
                        'settings'    => 'edumodo_archive_notice_page_views',
                        'label'       => esc_html__( 'Page Views', $this->text_domain ),
                        'section'     => 'edumodo_section_archive_notice',
                        'default'     => 'on',
                        'priority'    => 10,
                        'choices'     => [
                            'on'   => esc_html__( 'Show', $this->text_domain ),
                            'off' => esc_html__( 'Hide', $this->text_domain )
                        ],
                    ] );
            #   end of notice region 


        }
    }
?>