<?php 





if (function_exists( 'kirki' ) ) {

    Kirki::add_config( 'db_theme_config_id', array(
        'capability'    => 'edit_theme_options',
        'option_type'   => 'theme_mod',
    ) );
    
    // Panel id

    new \Kirki\Panel(
        'db_panel_id',
        [
            'priority'    => 10,
            'title'       => esc_html__( 'Theme Settings', 'edify' ),
            'description' => esc_html__( 'Theme Settings', 'edify' ),
        ]
    );

    new \Kirki\Panel(
        'db_layout_id',
        [
            'priority'    => 10,
            'title'       => esc_html__( 'General Layout', 'edify' ),
            'description' => esc_html__( 'General Layout', 'edify' ),
        ]
    );

    /*======================================
        SECTIONS
    =======================================*/

    //  Section 

    new \Kirki\Section(
        'general_section_id',
        [
            'title'       => esc_html__( 'General', 'edify' ),
            'panel'       => 'db_panel_id',
            'priority'    => 160,
        ]
    );

    //  Section 

    new \Kirki\Section(
        'typo_section_id',
        [
            'title'       => esc_html__( 'Typography', 'edify' ),
            'panel'       => 'db_panel_id',
            'priority'    => 160,
        ]
    );

     //  Section 

     new \Kirki\Section(
        'header_topbar_section_id',
        [
            'title'       => esc_html__( 'Header Topbar', 'edify' ),
            'panel'       => 'db_panel_id',
            'priority'    => 160,
        ]
    );
  

    new \Kirki\Section(
        'header_section_id',
        [
            'title'       => esc_html__( 'Header', 'edify' ),
            // 'description' => esc_html__( 'Header', 'edify' ),
            'panel'       => 'db_panel_id',
            'priority'    => 160,
        ]
    );



    new \Kirki\Section(
        'page_header_section_id',
        [
            'title'       => esc_html__( 'Page Header', 'edify' ),
            'panel'       => 'db_panel_id',
            'priority'    => 160,
        ]
    );


       //  Section 
    new \Kirki\Section(
        'blog_section_id',
        [
            'title'       => esc_html__( 'Blog Layout', 'edify' ),
            'panel'       => 'db_layout_id',
            'priority'    => 160,
        ]
    );

       //  Section 
    new \Kirki\Section(
        'front_section_id',
        [
            'title'       => esc_html__( 'Front Page Layout', 'edify' ),
            'panel'       => 'db_layout_id',
            'priority'    => 160,
        ]
    );
  
      //  Section 
      new \Kirki\Section(
        'blog_single_section',
        [
            'title'       => esc_html__( 'Blog Single', 'edify' ),
            'panel'       => 'db_panel_id',
            'priority'    => 160,
        ]
    );
        
    //  Section 
    new \Kirki\Section(
        'sidebar_section_id',
        [
            'title'       => esc_html__( 'Sidebar Layout', 'edify' ),
            'panel'       => 'db_panel_id',
            'priority'    => 160,
        ]
    );

    //  Section 
    new \Kirki\Section(
        'footer_section_id',
        [
            'title'       => esc_html__( 'Footer', 'edify' ),
            'panel'       => 'db_panel_id',
            'priority'    => 160,
        ]
    );

      //  Section 
    new \Kirki\Section(
        'error_section_id',
        [
            'title'       => esc_html__( '404 Page', 'edify' ),
            'panel'       => 'db_panel_id',
            'priority'    => 160,
        ]
    );

       //  Section 
    new \Kirki\Section(
        'shop_section_id',
        [
            'title'       => esc_html__( 'Shop Page', 'edify' ),
            'panel'       => 'db_panel_id',
            'priority'    => 160,
        ]
    );
    
    
    

    /*======================================
        CONTROLS
    ==================================*/

    get_template_part( 'core/customizer/options/option','general');
    get_template_part( 'core/customizer/options/option','topbar');
    get_template_part( 'core/customizer/options/option','front');
    get_template_part( 'core/customizer/options/option','header');
    get_template_part( 'core/customizer/options/option','typo');
    get_template_part( 'core/customizer/options/option','sidebar');
    get_template_part( 'core/customizer/options/option','blog');
    get_template_part( 'core/customizer/options/option','blogsingle');
    get_template_part( 'core/customizer/options/option','footer');
    get_template_part( 'core/customizer/options/option','error');
    get_template_part( 'core/customizer/options/option','page');
    get_template_part( 'core/customizer/options/option','shop');

}