<?php
    // Preloader Section
    Kirki::add_section( 'prealoader_section', array(
        'title'      => esc_html__( 'Prealoader', 'minimalblog' ),
        'priority'   => 11,
        'panel'      => 'minimalblog',
        'capability' => 'edit_theme_options',
    ) );

    // Preloader ON/OFF
    Kirki::add_field( 'minimalblog_config', [
        'type'        => 'switch',
        'settings'    => 'prealoader_on_off',
        'label'       => esc_html__( 'Prealoader ON/OFF', 'minimalblog' ),
        'section'     => 'prealoader_section',
        'default'     => false,
        'choices'     => [
            'on'  => esc_html__( 'Enable', 'minimalblog' ),
            'off' => esc_html__( 'Disable', 'minimalblog' ),
        ],
    ] );

    // Preloader Image
    Kirki::add_field( 'minimalblog_config', [
        'type'        => 'image',
        'settings'    => 'prealoader_image',
        'label'       => esc_html__( 'Upload Preloader Image', 'minimalblog' ),
        'section'     => 'prealoader_section',
        'default'     => '',
        'choices'     => [
            'save_as' => 'array',
        ],
    ] );
