<?php
/**
 * Customizer fields for banner title settings.
 *
 * @package Eronex
 * @since   0.0.1
 */

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

use Kirki\Field\Color;
use Kirki\Field\Dimensions;
use Kirki\Field\Select;
use Kirki\Pro\Field\Divider;

new Select(
	array(
		'label'    => esc_html__( 'Font Family', 'eronex' ),
		'settings' => 'eronex_banner_title_family',
		'section'  => 'eronex_banner_title',
		'default'  => 'primary',
		'choices'  => array(
			'primary'   => esc_html__( 'Primary', 'eronex' ),
			'secondary' => esc_html__( 'Secondary', 'eronex' ),
		),
	)
);


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

new Dimensions(
	array(
		'label'      => esc_html__( 'Font Size', 'eronex' ),
		'settings'   => 'eronex_banner_title_size',
		'section'    => 'eronex_banner_title',
		'default'    => array(
			'mobile'  => array(
				'font-size'   => '',
				'line-height' => '',
			),
			'tablet'  => array(
				'font-size'   => '',
				'line-height' => '',
			),
			'desktop' => array(
				'font-size'   => '',
				'line-height' => '',

			),
		),
		'choices'    => array(
			'labels' => array(
				'font-size'   => esc_html__( 'Font Size', 'eronex' ),
				'line-height' => esc_html__( 'Line Height', 'eronex' ),
			),
		),
		'output'     => array(
			array(
				'element'     => '.eronex-banner .eronex-banner-title',
				'media_query' => array(
					'desktop' => $desktop_media_query,
					'tablet'  => $tablet_media_query,
					'mobile'  => $mobile_media_query,
				),
			),
		),
		'transport'  => 'auto',
		'responsive' => true,
	)
);

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

new Color(
	array(
		'label'     => esc_html__( 'Color', 'eronex' ),
		'settings'  => 'eronex_banner_title_color',
		'section'   => 'eronex_banner_title',
		'transport' => 'auto',
		'default'   => '',
		'output'    => array(
			array(
				'element'  => '.eronex-banner .eronex-banner-title',
				'property' => 'color',
			),
		),
	)
);

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

new Dimensions(
	array(
		'label'      => esc_html__( 'Margin', 'eronex' ),
		'settings'   => 'eronex_banner_title_margin',
		'section'    => 'eronex_banner_title',
		'default'    => array(
			'mobile'  => array(
				'margin-top'    => '',
				'margin-right'  => '',
				'margin-bottom' => '',
				'margin-left'   => '',
			),
			'tablet'  => array(
				'margin-top'    => '',
				'margin-right'  => '',
				'margin-bottom' => '',
				'margin-left'   => '',
			),
			'desktop' => array(
				'margin-top'    => '',
				'margin-right'  => '',
				'margin-bottom' => '',
				'margin-left'   => '',

			),
		),
		'choices'    => array(
			'labels' => array(
				'margin-top'    => esc_html__( 'Top', 'eronex' ),
				'margin-right'  => esc_html__( 'Right', 'eronex' ),
				'margin-bottom' => esc_html__( 'Bottom', 'eronex' ),
				'margin-left'   => esc_html__( 'Left', 'eronex' ),
			),
		),
		'output'     => array(
			array(
				'element'     => '.eronex-banner .eronex-banner-title',
				'media_query' => array(
					'desktop' => $desktop_media_query,
					'tablet'  => $tablet_media_query,
					'mobile'  => $mobile_media_query,
				),
			),
		),
		'transport'  => 'auto',
		'responsive' => true,
	)
);
