<?php
Kirki::add_section( 'books_slider_settings', array(
    'title'          => esc_html__( 'Books Slider Settings', 'author-portfolio' ),
    'description'          => esc_html__( 'This slider will appear on the blog page below of header.', 'author-portfolio' ),
    'panel'          => 'author_portfolio_book_settings_panel',
) );

Kirki::add_field( 'author_portfolio_config', [
    'type'        => 'switch',
    'settings'    => 'books_slider_on_off',
    'label'       => esc_html__( 'Books Slider Show//Hide', 'author-portfolio' ),
    'section'     => 'books_slider_settings',
    'default'     => '0',
    'choices'     => [
        'on'  => esc_html__( 'Show', 'author-portfolio' ),
        'off' => esc_html__( 'Hide', 'author-portfolio' ),
    ],
] );

Kirki::add_field( 'author_portfolio_config', [
	'type'        => 'number',
	'settings'    => 'books_per_page',
	'label'       => esc_html__( 'Post Per Page', 'author-portfolio' ),
	'section'     => 'books_slider_settings',
	'default'    => 5,
] );

Kirki::add_field( 'author_portfolio_config', [
	'type'        => 'number',
	'settings'    => 'slide_to_show',
	'label'       => esc_html__( 'Slide To Show (Large Screen)', 'author-portfolio' ),
	'section'     => 'books_slider_settings',
	'default'    => 4,
] );

Kirki::add_field( 'author_portfolio_config', [
    'type'        => 'number',
    'settings'    => 'slide_to_show_m_screen',
    'label'       => esc_html__( 'Slide To Show (Medium Screen)', 'author-portfolio' ),
    'section'     => 'books_slider_settings',
    'default'    => 3,
] );

Kirki::add_field( 'author_portfolio_config', [
    'type'        => 'number',
    'settings'    => 'slide_to_show_s_screen',
    'label'       => esc_html__( 'Slide To Show (Small Screen)', 'author-portfolio' ),
    'section'     => 'books_slider_settings',
    'default'    => 1,
] );

Kirki::add_field( 'author_portfolio_config', [
    'type'        => 'background',
    'settings'    => 'books_section_background',
    'label'       => esc_html__( 'Section Background', 'author-portfolio' ),
    'section'     => 'books_slider_settings',
    'default'     => [
        'background-color'      => '#f1f1f1',
        'background-image'      => '',
        'background-repeat'     => 'repeat',
        'background-position'   => 'center center',
        'background-size'       => 'cover',
        'background-attachment' => 'scroll',
    ],
    'transport'   => 'auto',
	'output' => array(
		array(
			'element'  => 'section.blog-page-header-area',
		),
	),
] );