<?php
Kirki::add_section( 'digital_marketing_blog_theme_header_settings', array(
    'title'          => esc_html__( 'Header Settings', 'digital-marketing-blog' ),
    'panel'          => 'digital_marketing_blog_global_panel',
) );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'switch',
    'settings'    => 'top_header_on_off',
    'label'       => esc_html__( 'Show/Hide Top Header Section', 'digital-marketing-blog' ),
    'section'     => 'digital_marketing_blog_theme_header_settings',
    'default'     => 1,
    'choices'     => [
        'on'  => esc_html__( 'Show', 'digital-marketing-blog' ),
        'off' => esc_html__( 'Hide', 'digital-marketing-blog' ),
    ],
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'color',
    'settings'    => 'top_header_bgc_color',
    'label'       => esc_html__( 'Top Header Background Color', 'digital-marketing-blog' ),
    'section'     => 'digital_marketing_blog_theme_header_settings',
    'default'     => '',
    'transport'   => 'auto',
    'output' => array(
        array(
            'element'  => 'header#masthead .top-header',
            'property' => 'background',
        ),
    ),
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'text',
    'settings'    => 'top_header_phone',
    'section'     => 'digital_marketing_blog_theme_header_settings',
    'label'       => "Phone",
    'default'     => esc_html__( "+1 763-227-5032", 'digital-marketing-blog' ),
    'transport'   => 'refresh',
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'text',
    'settings'    => 'top_header_email',
    'section'     => 'digital_marketing_blog_theme_header_settings',
    'label'       => "Email",
    'default'     => esc_html__( "your@test.com", 'digital-marketing-blog' ),
    'transport'   => 'refresh',
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'typography',
    'settings'    => 'top_header_typography',
    'label'       => esc_html__( 'Top Header Typography', 'digital-marketing-blog' ),
    'section'     => 'digital_marketing_blog_theme_header_settings',
    'default'     => [
        'font-family'    => 'Roboto',
        'variant'        => 'regular',
        'font-size'      => '16px',
        'line-height'    => '1.6',
        'letter-spacing' => '0px',
        'color'          => '#878c9c',
        'text-transform' => 'none',
    ],
    'transport'   => 'auto',
    'output'      => [
        [
            'element' => '#masthead .top-header',
        ],
    ],
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'color',
    'settings'    => 'header_bgc_color',
    'label'       => __( 'Header Background Color', 'digital-marketing-blog' ),
    'section'     => 'digital_marketing_blog_theme_header_settings',
    'default'     => '#ffffff',
    'transport'   => 'auto',
    'output' => array(
        array(
            'element'  => 'header#masthead',
            'property' => 'background',
        ),
    ),
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'typography',
    'settings'    => 'header_title_typography',
    'label'       => esc_html__( 'Site Title Typography', 'digital-marketing-blog' ),
    'section'     => 'digital_marketing_blog_theme_header_settings',
    'default'     => [
        'font-family'    => 'Roboto',
        'variant'        => '500',
        'font-size'      => '20px',
        'line-height'    => '27px',
        'letter-spacing' => '2px',
        'color'          => '#626678',
        'text-transform' => 'none',
    ],
    'transport'   => 'auto',
    'output'      => [
        [
            'element' => '.site-branding .site-title a',
        ],
    ],
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'typography',
    'settings'    => 'header_desc_typography',
    'label'       => esc_html__( 'Site Description Typography', 'digital-marketing-blog' ),
    'section'     => 'digital_marketing_blog_theme_header_settings',
    'default'     => [
        'font-family'    => 'Roboto',
        'variant'        => 'regular',
        'font-size'      => '1rem',
        'line-height'    => '1.4',
        'letter-spacing' => '0px',
        'color'          => '#626678',
        'text-transform' => 'none',
    ],
    'transport'   => 'auto',
    'output'      => [
        [
            'element' => '.site-branding p.site-description',
        ],
    ],
] );

Kirki::add_field( 'digital_marketing_blog_config', [
    'type'        => 'typography',
    'settings'    => 'header_menu_typography',
    'label'       => esc_html__( 'Menu Typography', 'digital-marketing-blog' ),
    'section'     => 'digital_marketing_blog_theme_header_settings',
    'default'     => [
        'font-family'    => 'Roboto',
        'variant'        => 'regular',
        'font-size'      => '17px',
        'line-height'    => '1.6',
        'letter-spacing' => '0px',
        'color'          => '#626678',
        'text-transform' => 'uppercase',
    ],
    'transport'   => 'auto',
    'output'      => [
        [
            'element' => '#cssmenu>ul>li>a',
        ],
    ],
] );
