<?php

if ( ! function_exists( 'ginevra_core_add_minimal_mobile_header_options' ) ) {
	/**
	 * Function that add additional header layout options
	 *
	 * @param object $page
	 * @param array $general_tab
	 */
	function ginevra_core_add_minimal_mobile_header_options( $page, $general_tab ) {

		$section = $general_tab->add_section_element(
			array(
				'name'       => 'qodef_minimal_mobile_header_section',
				'title'      => esc_html__( 'Minimal Mobile Header', 'ginevra-core' ),
				'dependency' => array(
					'show' => array(
						'qodef_mobile_header_layout' => array(
							'values'        => 'minimal',
							'default_value' => '',
						),
					),
				),
			)
		);

		$section->add_field_element(
			array(
				'field_type'  => 'text',
				'name'        => 'qodef_minimal_mobile_header_height',
				'title'       => esc_html__( 'Minimal Height', 'ginevra-core' ),
				'description' => esc_html__( 'Enter header height', 'ginevra-core' ),
				'args'        => array(
					'suffix' => esc_html__( 'px', 'ginevra-core' ),
				),
			)
		);

		$section->add_field_element(
			array(
				'field_type'  => 'text',
				'name'        => 'qodef_minimal_mobile_header_side_padding',
				'title'       => esc_html__( 'Header Side Padding', 'ginevra-core' ),
				'description' => esc_html__( 'Enter side padding for header area', 'ginevra-core' ),
				'args'        => array(
					'suffix' => esc_html__( 'px or %', 'ginevra-core' ),
				),
			)
		);

		$section->add_field_element(
			array(
				'field_type'  => 'color',
				'name'        => 'qodef_minimal_mobile_header_background_color',
				'title'       => esc_html__( 'Header Background Color', 'ginevra-core' ),
				'description' => esc_html__( 'Enter header background color', 'ginevra-core' ),
			)
		);
	}

	add_action( 'ginevra_core_action_after_mobile_header_options_map', 'ginevra_core_add_minimal_mobile_header_options', 10, 2 );
}
