<?php
/**
 * Customizer fields for hamburger close button settings.
 *
 * @package Eronex
 * @since   0.0.1
 */

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

use Kirki\Field\Color;
use Kirki\Field\Dimension;
use Kirki\Field\Dimensions;
use Kirki\Field\Radio_Buttonset;
use Kirki\Pro\Field\Divider;


new Dimension(
	array(
		'label'      => esc_html__( 'Icon Size', 'eronex' ),
		'settings'   => 'eronex_hamburger_close_size',
		'section'    => 'eronex_hamburger_close',
		'transport'  => 'auto',
		'responsive' => true,
		'default'    => array(
			'desktop' => '',
			'tablet'  => '',
			'mobile'  => '',
		),
		'output'     => array(
			array(
				'element'     => '.eronex-hamburger-close-btn > i',
				'property'    => 'font-size',
				'media_query' => array(
					'desktop' => $desktop_media_query,
					'tablet'  => $tablet_media_query,
					'mobile'  => $mobile_media_query,
				),
			),
		),
	)
);

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

new Dimension(
	array(
		'label'      => esc_html__( 'Background Size', 'eronex' ),
		'settings'   => 'eronex_hamburger_close_bg_size',
		'section'    => 'eronex_hamburger_close',
		'transport'  => 'auto',
		'responsive' => true,
		'default'    => array(
			'desktop' => '',
			'tablet'  => '',
			'mobile'  => '',
		),
		'output'     => array(
			array(
				'element'     => '.eronex-hamburger-close-btn',
				'property'    => 'height',
				'media_query' => array(
					'desktop' => $desktop_media_query,
					'tablet'  => $tablet_media_query,
					'mobile'  => $mobile_media_query,
				),
			),
			array(
				'element'     => '.eronex-hamburger-close-btn',
				'property'    => 'width',
				'media_query' => array(
					'desktop' => $desktop_media_query,
					'tablet'  => $tablet_media_query,
					'mobile'  => $mobile_media_query,
				),
			),
		),
	)
);

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

new Radio_Buttonset(
	array(
		'label'     => esc_html__( 'Colors', 'eronex' ),
		'settings'  => 'eronex_hamburger_close_colors_tab',
		'section'   => 'eronex_hamburger_close',
		'default'   => 'normal',
		'transport' => 'auto',
		'choices'   => array(
			'normal' => esc_html__( 'Normal', 'eronex' ),
			'hover'  => esc_html__( 'Hover', 'eronex' ),
		),
	)
);

new Color(
	array(
		'label'     => esc_html__( 'Icon Color', 'eronex' ),
		'settings'  => 'eronex_hamburger_close_color',
		'section'   => 'eronex_hamburger_close',
		'default'   => '',
		'transport' => 'auto',
		'choices'   => array(
			'alpha' => true,
		),
		'output'    => array(
			array(
				'element'  => '.eronex-hamburger-close-btn',
				'property' => 'color',
			),
		),
	)
);

new Color(
	array(
		'label'     => esc_html__( 'Background Color', 'eronex' ),
		'settings'  => 'eronex_hamburger_close_bg',
		'section'   => 'eronex_hamburger_close',
		'default'   => '',
		'transport' => 'auto',
		'choices'   => array(
			'alpha' => true,
		),
		'output'    => array(
			array(
				'element'  => '.eronex-hamburger-close-btn',
				'property' => 'background-color',
			),
		),
	)
);

new Color(
	array(
		'label'     => esc_html__( 'Border Color', 'eronex' ),
		'settings'  => 'eronex_hamburger_close_border_color',
		'section'   => 'eronex_hamburger_close',
		'default'   => '',
		'transport' => 'auto',
		'choices'   => array(
			'alpha' => true,
		),
		'output'    => array(
			array(
				'element'  => '.eronex-hamburger-close-btn',
				'property' => 'border-color',
			),
		),
	)
);

new Color(
	array(
		'label'     => esc_html__( 'Icon Color', 'eronex' ),
		'settings'  => 'eronex_hamburger_close_hover_color',
		'section'   => 'eronex_hamburger_close',
		'default'   => '',
		'transport' => 'auto',
		'choices'   => array(
			'alpha' => true,
		),
		'output'    => array(
			array(
				'element'  => '.eronex-hamburger-close-btn:hover,.eronex-hamburger-close-btn:focus',
				'property' => 'color',
			),
		),
	)
);

new Color(
	array(
		'label'     => esc_html__( 'Background Color', 'eronex' ),
		'settings'  => 'eronex_hamburger_close_hover_bg',
		'section'   => 'eronex_hamburger_close',
		'default'   => '',
		'transport' => 'auto',
		'choices'   => array(
			'alpha' => true,
		),
		'output'    => array(
			array(
				'element'  => '.eronex-hamburger-close-btn:hover,.eronex-hamburger-close-btn:focus',
				'property' => 'background-color',
			),
		),
	)
);

new Color(
	array(
		'label'     => esc_html__( 'Border Color', 'eronex' ),
		'settings'  => 'eronex_hamburger_close_hover_border',
		'section'   => 'eronex_hamburger_close',
		'default'   => '',
		'transport' => 'auto',
		'choices'   => array(
			'alpha' => true,
		),
		'output'    => array(
			array(
				'element'  => '.eronex-hamburger-close-btn:hover,.eronex-hamburger-close-btn:focus',
				'property' => 'border-color',
			),
		),
	)
);

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

new Dimensions(
	array(
		'label'      => esc_html__( 'Border', 'eronex' ),
		'settings'   => 'eronex_hamburger_close_border',
		'section'    => 'eronex_hamburger_close',
		'default'    => array(
			'mobile'  => array(
				'border-top-width'    => '',
				'border-right-width'  => '',
				'border-bottom-width' => '',
				'border-left-width'   => '',
			),
			'tablet'  => array(
				'border-top-width'    => '',
				'border-right-width'  => '',
				'border-bottom-width' => '',
				'border-left-width'   => '',
			),
			'desktop' => array(
				'border-top-width'    => '',
				'border-right-width'  => '',
				'border-bottom-width' => '',
				'border-left-width'   => '',

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

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

new Dimensions(
	array(
		'label'      => esc_html__( 'Border Radius', 'eronex' ),
		'settings'   => 'eronex_hamburger_close_radius',
		'section'    => 'eronex_hamburger_close',
		'default'    => array(
			'mobile'  => array(
				'border-top-left-radius'     => '',
				'border-top-right-radius'    => '',
				'border-bottom-left-radius'  => '',
				'border-bottom-right-radius' => '',
			),
			'tablet'  => array(
				'border-top-left-radius'     => '',
				'border-top-right-radius'    => '',
				'border-bottom-left-radius'  => '',
				'border-bottom-right-radius' => '',
			),
			'desktop' => array(
				'border-top-left-radius'     => '',
				'border-top-right-radius'    => '',
				'border-bottom-left-radius'  => '',
				'border-bottom-right-radius' => '',

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