<?php 
    class Edumodo_Customizer_Single_Event{
        private $panel_key;
        private $priority;
        public function __construct($panel_key, $priority){
            $this->panel_key = $panel_key;
            $this->priority = $priority;
            $this->event_single_kirki_config();
        }
        public function event_single_kirki_config(){
            
            Kirki::add_section( 'edumodo_section_event_single', array(
                'title'          => esc_html__( 'Event', 'edumodo' ),
                'panel'          => $this->panel_key,
                'priority'       => $this->priority,
            ) );
                Kirki::add_field( 'edumodo_event_single_title', [
                    'type'        => 'typography',
                    'settings'    => 'edumodo_event_single_title',
                    'label'       => esc_html__( 'Title', 'edumodo' ),
                    'section'     => 'edumodo_section_event_single',
                    'priority'    => 10,
                    'transport'   => 'auto',
                    'default'     => [
                        'color'			 => '#07294d',
                        'text-transform' => 'none',
                        'font-size'		 => '34px',
                        'line-height'	 => '1.1',
                        'letter-spacing' => '0',
                    ],
                    'output'      => [
                        [
                            'element' => '.tribe_events-template-default h1.tribe-events-single-event-title',
                        ],
                    ],
                ] );
                Kirki::add_field( 'edumodo_event_single_title_margin', [
                    'type'        => 'dimensions',
                    'settings'    => 'edumodo_event_single_title_margin',
                    'label'       => esc_html__( 'Title Spacing', 'edumodo' ),
                    'section'     => 'edumodo_section_event_single',
                    'priority' => 10,
                    'default'     => [
                        'bottom'  => '15px',
                    ],
                ] );
                Kirki::add_field( 'edumodo_event_single_image_margin', [
                    'type'        => 'dimensions',
                    'settings'    => 'edumodo_event_single_image_margin',
                    'label'       => esc_html__( 'Image Spacing', 'edumodo' ),
                    'section'     => 'edumodo_section_event_single',
                    'priority' => 10,
                    'default'     => [
                        'top'  => '15px',
                        'bottom'  => '15px',
                    ],
                ] );
                
                // Kirki::add_field( 'edumodo_event_single_heading_color', [
                //     'type' 	=> 'heading',
                //     'label'	=> 'Color',
                //     'section'     => 'edumodo_section_event_single',
                //     'priority' => 20,
                // ]);
                Kirki::add_field( 'edumodo_event_single_meta_color', [
                    'type'        => 'color',
                    'settings'    => 'edumodo_event_single_meta_color',
                    'label'       => __( 'Meta', 'edumodo' ),
                    'section'     => 'edumodo_section_event_single',
                    'choices'     => [ 'alpha' => true],
                    'transport'   => 'auto',
                    'priority' => 20,
                ] );

        }
    }
?>