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

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

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

new Dimension(
	array(
		'label'      => esc_html__( 'Icon Size', 'eronex' ),
		'settings'   => 'eronex_hamburger_dropdown_size',
		'section'    => 'eronex_hamburger_submenu_icon',
		'transport'  => 'auto',
		'responsive' => true,
		'default'    => array(
			'desktop' => '',
			'tablet'  => '',
			'mobile'  => '',
		),
		'output'     => array(
			array(
				'element'     => '.eronex-hamburger-wrapper .eronex-dropdown-icon',
				'property'    => 'font-size',
				'media_query' => array(
					'desktop' => $desktop_media_query,
					'tablet'  => $tablet_media_query,
					'mobile'  => $mobile_media_query,
				),
			),
		),
	)
);

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

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

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

new Radio_Buttonset(
	array(
		'label'     => esc_html__( 'Colors', 'eronex' ),
		'settings'  => 'eronex_hamburger_dropdown_colors_tab',
		'section'   => 'eronex_hamburger_submenu_icon',
		'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_dropdown_color',
		'section'   => 'eronex_hamburger_submenu_icon',
		'default'   => '',
		'transport' => 'auto',
		'choices'   => array(
			'alpha' => true,
		),
		'output'    => array(
			array(
				'element'  => '.eronex-hamburger-wrapper .eronex-dropdown-icon',
				'property' => 'color',
			),
		),
	)
);

new Color(
	array(
		'label'     => esc_html__( 'Background Color', 'eronex' ),
		'settings'  => 'eronex_hamburger_dropdown_bg',
		'section'   => 'eronex_hamburger_submenu_icon',
		'default'   => '',
		'transport' => 'auto',
		'choices'   => array(
			'alpha' => true,
		),
		'output'    => array(
			array(
				'element'  => '.eronex-hamburger-wrapper .eronex-dropdown-icon',
				'property' => 'background-color',
			),
		),
	)
);

new Color(
	array(
		'label'     => esc_html__( 'Icon Color', 'eronex' ),
		'settings'  => 'eronex_hamburger_dropdown_hover_color',
		'section'   => 'eronex_hamburger_submenu_icon',
		'default'   => '',
		'transport' => 'auto',
		'choices'   => array(
			'alpha' => true,
		),
		'output'    => array(
			array(
				'element'  => '.eronex-hamburger-wrapper .eronex-dropdown-icon:hover,.eronex-hamburger-wrapper .eronex-dropdown-icon:focus',
				'property' => 'color',
			),
		),
	)
);

new Color(
	array(
		'label'     => esc_html__( 'Background Color', 'eronex' ),
		'settings'  => 'eronex_hamburger_dropdown_hover_bg',
		'section'   => 'eronex_hamburger_submenu_icon',
		'default'   => '',
		'transport' => 'auto',
		'choices'   => array(
			'alpha' => true,
		),
		'output'    => array(
			array(
				'element'  => '.eronex-hamburger-wrapper .eronex-dropdown-icon:hover,.eronex-hamburger-wrapper .eronex-dropdown-icon:focus',
				'property' => 'background-color',
			),
		),
	)
);

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

new Dimensions(
	array(
		'label'      => esc_html__( 'Border Radius', 'eronex' ),
		'settings'   => 'eronex_hamburger_dropdown_radius',
		'section'    => 'eronex_hamburger_submenu_icon',
		'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-wrapper .eronex-dropdown-icon',
				'media_query' => array(
					'desktop' => $desktop_media_query,
					'tablet'  => $tablet_media_query,
					'mobile'  => $mobile_media_query,
				),
			),
		),
		'transport'  => 'auto',
		'responsive' => true,
	)
);
