<?php
Kirki::add_section( 'book_section', array(
    'title'          => esc_html__( 'Book Section', 'author-blog' ),
    'description'    => esc_html__( 'Customize Book Section', 'author-blog' ),
    'panel'          => 'author_blog_global_panel',
) );

Kirki::add_field( 'author_blog_config', array(
    'type'        => 'switch',
    'settings'    => 'book_section_show_hide',
    'label'       => esc_html__( 'Show Book Section', 'author-blog' ),
    'section'     => 'book_section',
    'default'     => true,
    'choices'     => array(
        'on'  => esc_html__( 'Enable', 'author-blog' ),
        'off' => esc_html__( 'Disable', 'author-blog' ),
    ),
) );

Kirki::add_field( 'author_blog_config', array(
    'type'        => 'image',
    'settings'    => 'book_image_upload',
    'label'       => esc_html__( 'Upload Image', 'author-blog' ),
    'section'     => 'book_section',
) );

Kirki::add_field( 'author_blog_config', array(
    'type'        => 'textarea',
    'settings'    => 'book_name',
    'label'       => esc_html__( 'Name of Book', 'author-blog' ),
    'section'     => 'book_section',
    'default'     => '',
) );

Kirki::add_field( 'author_blog_config', array(
    'type'        => 'textarea',
    'settings'    => 'book_title',
    'label'       => esc_html__( 'Title', 'author-blog' ),
    'section'     => 'book_section',
    'default'     => esc_html__( 'Looking for a Great Book to Read? Look No Further!', 'author-blog' ),
) );

Kirki::add_field( 'author_blog_config', array(
    'type'        => 'textarea',
    'settings'    => 'book_description',
    'label'       => esc_html__( 'Description', 'author-blog' ),
    'section'     => 'book_section',
    'default'     => esc_html__( 'This section is perfect for displaying your paid book or your free email optin offer. You can turn it off or make changes to it from your theme options panel.', 'author-blog' ),
) );

Kirki::add_field( 'author_blog_config', array(
    'type'        => 'text',
    'settings'    => 'book_button_text',
    'label'       => esc_html__( 'Button Text', 'author-blog' ),
    'section'     => 'book_section',
    'default'     => esc_html__( 'Get Your Copy Today>>', 'author-blog' ),
) );

Kirki::add_field( 'author_blog_config', array(
    'type'        => 'url',
    'settings'    => 'book_button_link',
    'label'       => esc_html__( 'Button Link', 'author-blog' ),
    'section'     => 'book_section',
    'default'     => '#',
) );
