<?php
/**
 * Customizer fields for pagination 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\Field\Select;
use Kirki\Pro\Field\Divider;

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

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

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

new Dimensions(
	array(
		'label'       => esc_html__( 'Font Size', 'eronex' ),
		'settings'    => 'eronex_pagination_font_size',
		'section'     => 'eronex_general_pagination',
		'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-pagination',
				'media_query' => array(
					'desktop' => $desktop_media_query,
					'tablet'  => $tablet_media_query,
					'mobile'  => $mobile_media_query,
				),
			),
		),
		'transport'   => 'auto',
		'responsive'  => true,
	)
);

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

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

new Color(
	array(
		'label'     => esc_html__( 'Text Color', 'eronex' ),
		'settings'  => 'eronex_pagination_color',
		'section'   => 'eronex_general_pagination',
		'default'   => '',
		'transport' => 'auto',
		'choices'   => array(
			'alpha' => true,
		),
		'output'    => array(
			array(
				'element'  => '.eronex-pagination',
				'property' => 'color',
			),
		),
	)
);

new Color(
	array(
		'label'     => esc_html__( 'Background Color', 'eronex' ),
		'settings'  => 'eronex_pagination_bg',
		'section'   => 'eronex_general_pagination',
		'default'   => '',
		'transport' => 'auto',
		'choices'   => array(
			'alpha' => true,
		),
		'output'    => array(
			array(
				'element'  => '.eronex-pagination',
				'property' => 'background-color',
			),
		),
	)
);

new Color(
	array(
		'label'     => esc_html__( 'Border Color', 'eronex' ),
		'settings'  => 'eronex_pagination_border_color',
		'section'   => 'eronex_general_pagination',
		'default'   => '',
		'transport' => 'auto',
		'choices'   => array(
			'alpha' => true,
		),
		'output'    => array(
			array(
				'element'  => '.eronex-pagination',
				'property' => 'border-color',
			),
		),
	)
);

new Color(
	array(
		'label'     => esc_html__( 'Text Color', 'eronex' ),
		'settings'  => 'eronex_pagination_hover_color',
		'section'   => 'eronex_general_pagination',
		'default'   => '',
		'transport' => 'auto',
		'choices'   => array(
			'alpha' => true,
		),
		'output'    => array(
			array(
				'element'  => '.eronex-pagination:hover,.eronex-pagination:focus',
				'property' => 'color',
			),
		),
	)
);

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

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

new Color(
	array(
		'label'     => esc_html__( 'Text Color', 'eronex' ),
		'settings'  => 'eronex_pagination_active_color',
		'section'   => 'eronex_general_pagination',
		'default'   => '',
		'transport' => 'auto',
		'choices'   => array(
			'alpha' => true,
		),
		'output'    => array(
			array(
				'element'  => '.eronex-pagination:active,.eronex-pagination:focus',
				'property' => 'color',
			),
		),
	)
);

new Color(
	array(
		'label'     => esc_html__( 'Background Color', 'eronex' ),
		'settings'  => 'eronex_pagination_active_bg',
		'section'   => 'eronex_general_pagination',
		'default'   => '#6A7995',
		'transport' => 'auto',
		'choices'   => array(
			'alpha' => true,
		),
		'output'    => array(
			array(
				'element'  => '.eronex-pagination:active,.eronex-pagination:focus',
				'property' => 'background-color',
			),
		),
	)
);

new Color(
	array(
		'label'     => esc_html__( 'Border Color', 'eronex' ),
		'settings'  => 'eronex_pagination_active_border',
		'section'   => 'eronex_general_pagination',
		'default'   => '',
		'transport' => 'auto',
		'choices'   => array(
			'alpha' => true,
		),
		'output'    => array(
			array(
				'element'  => '.eronex-pagination:active,.eronex-pagination:focus',
				'property' => 'border-color',
			),
		),
	)
);

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

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

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

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

new Dimensions(
	array(
		'settings'    => 'eronex_pagination_radius',
		'label'       => esc_html__( 'Border Radius', 'eronex' ),
		'section'     => 'eronex_general_pagination',
		'default'     => array(
			'mobile'  => array(
				'padding-top'    => '',
				'padding-right'  => '',
				'padding-bottom' => '',
				'padding-left'   => '',
			),
			'tablet'  => array(
				'padding-top'    => '',
				'padding-right'  => '',
				'padding-bottom' => '',
				'padding-left'   => '',
			),
			'desktop' => array(
				'padding-top'    => '',
				'padding-right'  => '',
				'padding-bottom' => '',
				'padding-left'   => '',

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