<?php
/**
 * Customizer fields for header logo settings.
 *
 * @package Eronex
 * @since   0.0.1
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

use Kirki\Field\Dimension;
use Kirki\Field\Image;
use Kirki\Pro\Field\Divider;

new Image(
	array(
		'label'    => esc_html__( 'Logo Image', 'eronex' ),
		'settings' => 'eronex_header_logo',
		'section'  => 'eronex_header_logo',
		'default'  => '',
	)
);

new Divider(
	array(
		'settings' => 'eronex_header_logo_width_separator',
		'section'  => 'eronex_header_logo',
		'choices'  => array(
			'color' => $separator_color,
		),
	),
);

new Dimension(
	array(
		'label'      => esc_html__( 'Logo Width', 'eronex' ),
		'settings'   => 'eronex_header_logo_width',
		'section'    => 'eronex_header_logo',
		'transport'  => 'auto',
		'responsive' => true,
		'default'    => array(
			'desktop' => '',
			'tablet'  => '',
			'mobile'  => '',
		),
		'output'     => array(
			array(
				'element'     => '.eronex-header .eronex-default-logo',
				'property'    => 'width',
				'media_query' => array(
					'desktop' => $desktop_media_query,
					'tablet'  => $tablet_media_query,
					'mobile'  => $mobile_media_query,
				),
			),
		),
	)
);

new Divider(
	array(
		'settings'        => 'eronex_sticky_header_logo_separator',
		'section'         => 'eronex_header_logo',
		'choices'         => array(
			'color' => $separator_color,
		),
		'active_callback' => array(
			array(
				'setting'  => 'eronex_header_sticky',
				'operator' => '==',
				'value'    => true,
			),
		),
	),
);

new Image(
	array(
		'label'           => esc_html__( 'Sticky Logo Image', 'eronex' ),
		'settings'        => 'eronex_sticky_header_logo',
		'section'         => 'eronex_header_logo',
		'default'         => '',
		'active_callback' => array(
			array(
				'setting'  => 'eronex_header_sticky',
				'operator' => '==',
				'value'    => true,
			),
		),
	)
);

new Divider(
	array(
		'settings'        => 'eronex_sticky_header_logo_width_separator',
		'section'         => 'eronex_header_logo',
		'choices'         => array(
			'color' => $separator_color,
		),
		'active_callback' => array(
			array(
				'setting'  => 'eronex_header_sticky',
				'operator' => '==',
				'value'    => true,
			),
		),
	),
);

new Dimension(
	array(
		'label'           => esc_html__( 'Sticky Logo Width', 'eronex' ),
		'settings'        => 'eronex_sticky_header_logo_width',
		'section'         => 'eronex_header_logo',
		'transport'       => 'auto',
		'responsive'      => true,
		'default'         => array(
			'desktop' => '',
			'tablet'  => '',
			'mobile'  => '',
		),
		'active_callback' => array(
			array(
				'setting'  => 'eronex_header_sticky',
				'operator' => '==',
				'value'    => true,
			),
		),
		'output'          => array(
			array(
				'element'     => '.eronex-header .eronex-sticky-logo',
				'property'    => 'width',
				'media_query' => array(
					'desktop' => $desktop_media_query,
					'tablet'  => $tablet_media_query,
					'mobile'  => $mobile_media_query,
				),
			),
		),
	)
);
