<?php
/**
 * Customizer fields for typography and font settings.
 *
 * @package Eronex
 * @since   0.0.1
 */

use Kirki\Field\Dimensions;
use Kirki\Field\Typography;
use Kirki\Pro\Field\Divider;

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

new Typography(
	array(
		'label'     => esc_html__( 'Body Font', 'eronex' ),
		'settings'  => 'eronex_typo_primary',
		'section'   => 'eronex_general_typo',
		'default'   => array(
			'font-family'    => 'DM Sans',
			'variant'        => 'regular',
			'text-transform' => '',
			'letter-spacing' => '',
		),
		'output'    => array(
			array(
				'element' => 'body, .eronex-main-font',
			),
		),
		'transport' => 'auto',
	)
);

new Dimensions(
	array(
		'label'      => esc_html__( 'Body Text', 'eronex' ),
		'settings'   => 'eronex_typo_primary_font',
		'section'    => 'eronex_general_typo',
		'default'    => array(
			'mobile'  => array(
				'font-size'      => '',
				'line-height'    => '',
				'letter-spacing' => '',
			),
			'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'     => 'body',
				'media_query' => array(
					'desktop' => $desktop_media_query,
					'tablet'  => $tablet_media_query,
					'mobile'  => $mobile_media_query,
				),
			),
		),
		'transport'  => 'auto',
		'responsive' => true,
	)
);

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

new Typography(
	array(
		'label'     => esc_html__( 'Heading Font', 'eronex' ),
		'settings'  => 'eronex_typo_secondary',
		'section'   => 'eronex_general_typo',
		'default'   => array(
			'font-family'    => 'Figtree',
			'variant'        => '500',
			'text-transform' => '',
			'letter-spacing' => '',
		),
		'output'    => array(
			array(
				'element' => 'h1,h2,h3,h4,h5,h6,.eronex-alt-font',
			),
		),
		'transport' => 'auto',
	)
);

new Dimensions(
	array(
		'label'      => esc_html__( 'Heading H1', 'eronex' ),
		'settings'   => 'eronex_heading_h1',
		'section'    => 'eronex_general_typo',
		'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'     => 'h1',
				'media_query' => array(
					'desktop' => $desktop_media_query,
					'tablet'  => $tablet_media_query,
					'mobile'  => $mobile_media_query,
				),
			),
		),
		'transport'  => 'auto',
		'responsive' => true,
	)
);

new Dimensions(
	array(
		'label'      => esc_html__( 'Heading H2', 'eronex' ),
		'settings'   => 'eronex_heading_h2',
		'section'    => 'eronex_general_typo',
		'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'     => 'h2',
				'media_query' => array(
					'desktop' => $desktop_media_query,
					'tablet'  => $tablet_media_query,
					'mobile'  => $mobile_media_query,
				),
			),
		),
		'transport'  => 'auto',
		'responsive' => true,
	)
);

new Dimensions(
	array(
		'label'      => esc_html__( 'Heading H3', 'eronex' ),
		'settings'   => 'eronex_heading_h3',
		'section'    => 'eronex_general_typo',
		'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'     => 'h3',
				'media_query' => array(
					'desktop' => $desktop_media_query,
					'tablet'  => $tablet_media_query,
					'mobile'  => $mobile_media_query,
				),
			),
		),
		'transport'  => 'auto',
		'responsive' => true,
	)
);

new Dimensions(
	array(
		'label'      => esc_html__( 'Heading H4', 'eronex' ),
		'settings'   => 'eronex_heading_h4',
		'section'    => 'eronex_general_typo',
		'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'     => 'h4',
				'media_query' => array(
					'desktop' => $desktop_media_query,
					'tablet'  => $tablet_media_query,
					'mobile'  => $mobile_media_query,
				),
			),
		),
		'transport'  => 'auto',
		'responsive' => true,
	)
);

new Dimensions(
	array(
		'label'      => esc_html__( 'Heading H5', 'eronex' ),
		'settings'   => 'eronex_heading_h5',
		'section'    => 'eronex_general_typo',
		'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'     => 'h5',
				'media_query' => array(
					'desktop' => $desktop_media_query,
					'tablet'  => $tablet_media_query,
					'mobile'  => $mobile_media_query,
				),
			),
		),
		'transport'  => 'auto',
		'responsive' => true,
	)
);

new Dimensions(
	array(
		'label'      => esc_html__( 'Heading H6', 'eronex' ),
		'settings'   => 'eronex_heading_h6',
		'section'    => 'eronex_general_typo',
		'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'     => 'h6',
				'media_query' => array(
					'desktop' => $desktop_media_query,
					'tablet'  => $tablet_media_query,
					'mobile'  => $mobile_media_query,
				),
			),
		),
		'transport'  => 'auto',
		'responsive' => true,
	)
);
