<?php

Kirki::add_section( 'banner_section', array(
    'title'          => esc_html__( 'Banner Settings', 'digital-marketing-blog' ),
    'description'    => esc_html__( 'Customize Banner section', 'digital-marketing-blog' ),
    'panel'          => 'digital_marketing_blog_global_panel',
    'capability'     => 'edit_theme_options',
) );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'color',
    'settings'    => 'banner_bgc_color',
    'label'       => esc_html__( 'Banner Background Color', 'digital-marketing-blog' ),
    'section'     => 'banner_section',
    'default'     => '#1e154e',
    'transport'   => 'auto',
    'output' => array(
        array(
            'element'  => 'section.banner-section, .wave, .wave:after',
            'property' => 'background',
        ),
    ),
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'     => 'text',
    'settings' => 'banner_sub_title',
    'label'    => esc_html__( 'Sub Title', 'digital-marketing-blog' ),
    'section'  => 'banner_section',
    'default'  => esc_html__( 'DIGITAL MARKETING STRATEGY', 'digital-marketing-blog' ),
    'transport' => 'postMessage',
    'js_vars'   => [
        [
            'element'  => '.hero-content .banner-sub-title',
            'function' => 'html',
        ]
    ],

] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'     => 'text',
    'settings' => 'banner_title',
    'label'    => esc_html__( 'Title', 'digital-marketing-blog' ),
    'section'  => 'banner_section',
    'default'  => esc_html__( 'We bring you new customers', 'digital-marketing-blog' ),
    'transport' => 'postMessage',
    'js_vars'   => [
        [
            'element'  => '.hero-content .banner-title',
            'function' => 'html',
        ]
    ],

] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'     => 'textarea',
    'settings' => 'banner_description',
    'label'    => esc_html__( 'Description', 'digital-marketing-blog' ),
    'section'  => 'banner_section',
    'default'  => esc_html__( 'We build effective strategies to help you reach customers and prospects across the entire web.', 'digital-marketing-blog' ),
    'transport' => 'postMessage',
    'js_vars'   => [
        [
            'element'  => '.hero-content .banner-description',
            'function' => 'html',
        ]
    ],

] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'     => 'text',
    'settings' => 'banner_button_text',
    'label'    => esc_html__( 'Button Text', 'digital-marketing-blog' ),
    'section'  => 'banner_section',
    'default'  => esc_html__( 'Shop Now', 'digital-marketing-blog' ),
    'transport' => 'postMessage',
    'js_vars'   => [
        [
            'element'  => '.shop-now-button a',
            'function' => 'html',
        ]
    ],
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'     => 'link',
    'settings' => 'banner_button_link',
    'label'    => esc_html__( 'Button Link', 'digital-marketing-blog' ),
    'section'  => 'banner_section',
    'default'  => '#',
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'image',
    'settings'    => 'banner_image',
    'label'       => esc_html__( 'Banner image', 'digital-marketing-blog' ),
    'section'     => 'banner_section',
    'transport'   => 'refresh',
    'choices'     => [
        'save_as' => 'array',
    ],
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'typography',
    'settings'    => 'banner_title_typography',
    'label'       => esc_html__( 'Banner Title Typography', 'digital-marketing-blog' ),
    'section'     => 'banner_section',
    'default'     => [
        'font-family'    => 'Roboto',
        'variant'        => 'bold',
        'font-size'      => '3.375rem',
        'line-height'    => '1.6',
        'letter-spacing' => '0px',
        'color'          => '#ffffff',
        'text-transform' => 'none',
        'text-align'     => 'center',
    ],

    'transport'   => 'auto',
    'output'      => [
        [
            'element' => '.banner-title',
        ],
    ],
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'typography',
    'settings'    => 'banner_paragraph_typography',
    'label'       => esc_html__( 'Banner Paragraph Typography', 'digital-marketing-blog' ),
    'section'     => 'banner_section',
    'default'     => [
        'font-family'    => 'Roboto',
        'variant'        => 'regular',
        'font-size'      => '1rem',
        'line-height'    => '1.6',
        'letter-spacing' => '0px',
        'color'          => '#ffffff',
        'text-transform' => 'none',
        'text-align'     => 'left',
    ],
    'transport'   => 'auto',
    'output'      => [
        [
            'element' => '.banner-descriptions',
        ],
    ],
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'multicolor',
    'settings'    => 'banner_button_colors',
    'label'       => esc_html__( 'Button Color', 'digital-marketing-blog' ),
    'section'     => 'banner_section',
    'choices'     => [
        'btn_bg'    => esc_html__( 'Background Color', 'digital-marketing-blog' ),
        'btn_text'   => esc_html__( 'Text Color', 'digital-marketing-blog' ),
        'btn_hover_bg'   => esc_html__( 'Background Hover Color', 'digital-marketing-blog' ),
        'btn_hover_text'   => esc_html__( 'Text Hover Color', 'digital-marketing-blog' ),
    ],
    'transport' => 'auto',
    'default'     => [
        'btn_bg'    => '#8574e9',
        'btn_text'   => '#ffffff',
        'btn_hover_bg'   => '#ffffff',
        'btn_hover_text'   => '#8574e9',
    ],
] );


Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'color',
    'settings'    => 'bottom_header_bgc_color',
    'label'       => esc_html__( 'Bottom Header Background Color', 'digital-marketing-blog' ),
    'section'     => 'banner_section',
    'default'     => '#8574E9',
    'transport'   => 'auto',
    'output' => array(
        array(
            'element'  => 'header#masthead .banner_column-wrapper',
            'property' => 'background',
        ),
    ),
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'text',
    'settings'    => 'header_bottom_col_1_icon',
    'label'       => wp_kses_post(
        sprintf(
            '%s <a href="%s" target="_blank" rel="noopener noreferrer">%s</a>',
            esc_html__( 'Col-1 icon HTML', 'digital-marketing-blog' ),
            esc_url( 'https://fontawesome.com/v4/icons/' ),
            esc_html__( 'Icon reference', 'digital-marketing-blog' )
        )
    ),
    'section'     => 'banner_section',
    'default'     => '<i class="fa fa-line-chart"></i>',
    'transport'   => 'refresh',
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'text',
    'settings'    => 'header_bottom_col_1',
    'label'       => esc_html__( 'Banner content column 1', 'digital-marketing-blog' ),
    'section'     => 'banner_section',
    'default'     => esc_html__( 'Best Strategy', 'digital-marketing-blog' ),
    'transport'   => 'refresh',
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'textarea',
    'settings'    => 'header_bottom_col_1_description',
    'section'     => 'banner_section',
    'label'       => "",
    'default'     => esc_html__( "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", 'digital-marketing-blog' ),
    'transport'   => 'refresh',
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'text',
    'settings'    => 'header_bottom_col_2_icon',
    'label'       => wp_kses_post(
        sprintf(
            '%s <a href="%s" target="_blank" rel="noopener noreferrer">%s</a>',
            esc_html__( 'Col-2 icon HTML', 'digital-marketing-blog' ),
            esc_url( 'https://fontawesome.com/v4/icons/' ),
            esc_html__( 'Icon reference', 'digital-marketing-blog' )
        )
    ),
    'section'     => 'banner_section',
    'default'     => '<i class="fa fa-rocket"></i>',
    'transport'   => 'refresh',
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'text',
    'settings'    => 'header_bottom_col_2',
    'label'       => esc_html__( 'Banner content column 2', 'digital-marketing-blog' ),
    'section'     => 'banner_section',
    'default'     => esc_html__( 'Start up', 'digital-marketing-blog' ),
    'transport'   => 'refresh',
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'textarea',
    'settings'    => 'header_bottom_col_2_description',
    'section'     => 'banner_section',
    'label'       => "",
    'default'     => esc_html__( "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", 'digital-marketing-blog' ),
    'transport'   => 'refresh',
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'text',
    'settings'    => 'header_bottom_col_3_icon',
    'label'       => wp_kses_post(
        sprintf(
            '%s <a href="%s" target="_blank" rel="noopener noreferrer">%s</a>',
            esc_html__( 'Col-3 icon HTML', 'digital-marketing-blog' ),
            esc_url( 'https://fontawesome.com/v4/icons/' ),
            esc_html__( 'Icon reference', 'digital-marketing-blog' )
        )
    ),
    'section'     => 'banner_section',
    'default'     => '<i class="fa fa-users"></i>',
    'transport'   => 'refresh',
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'text',
    'settings'    => 'header_bottom_col_3',
    'label'       => esc_html__( 'Banner content column 3', 'digital-marketing-blog' ),
    'section'     => 'banner_section',
    'default'     => esc_html__( 'Organizations', 'digital-marketing-blog' ),
    'transport'   => 'refresh',
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'textarea',
    'settings'    => 'header_bottom_col_3_description',
    'section'     => 'banner_section',
    'label'       => "",
    'default'     => esc_html__( "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", 'digital-marketing-blog' ),
    'transport'   => 'refresh',
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'typography',
    'settings'    => 'bottom_header_typography',
    'label'       => esc_html__( 'Bottom Header Typography', 'digital-marketing-blog' ),
    'section'     => 'banner_section',
    'default'     => [
        'font-family'    => 'Roboto',
        'variant'        => 'regular',
        'font-size'      => '16px',
        'line-height'    => '1.6',
        'letter-spacing' => '0px',
        'color'          => '#ffffff',
        'text-transform' => 'none',
    ],
    'transport'   => 'auto',
    'output'      => [
        [
            'element' => '#masthead .main-header .banner_column-wrapper .banner_column-col',
        ],
    ],
] );

